diff --git a/Cargo.lock b/Cargo.lock index 9fe86a5b..6ac1fb0f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -797,7 +797,7 @@ dependencies = [ [[package]] name = "dropshot-authorization-header" -version = "0.1.0" +version = "0.3.0" dependencies = [ "async-trait", "base64", @@ -3772,7 +3772,7 @@ dependencies = [ [[package]] name = "v-api" -version = "0.2.0" +version = "0.3.0" dependencies = [ "anyhow", "async-trait", @@ -3824,7 +3824,7 @@ dependencies = [ [[package]] name = "v-api-installer" -version = "0.2.0" +version = "0.3.0" dependencies = [ "diesel", "diesel_migrations", @@ -3832,7 +3832,7 @@ dependencies = [ [[package]] name = "v-api-param" -version = "0.2.0" +version = "0.3.0" dependencies = [ "secrecy", "serde", @@ -3843,7 +3843,7 @@ dependencies = [ [[package]] name = "v-api-permission-derive" -version = "0.2.0" +version = "0.3.0" dependencies = [ "heck", "newtype-uuid", @@ -3860,7 +3860,7 @@ dependencies = [ [[package]] name = "v-model" -version = "0.2.0" +version = "0.3.0" dependencies = [ "async-bb8-diesel", "async-trait", @@ -4527,7 +4527,7 @@ checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9" [[package]] name = "xtask" -version = "0.1.0" +version = "0.3.0" dependencies = [ "clap", "regex", diff --git a/Cargo.toml b/Cargo.toml index 0160b5d0..e481cbeb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,6 +9,11 @@ members = [ ] resolver = "2" +[workspace.package] +publish = true +edition = "2024" +version = "0.3.0" + [workspace.dependencies] anyhow = "1.0" async-bb8-diesel = "0.3" diff --git a/dropshot-authorization-header/Cargo.toml b/dropshot-authorization-header/Cargo.toml index a2b1d175..a7eabca0 100644 --- a/dropshot-authorization-header/Cargo.toml +++ b/dropshot-authorization-header/Cargo.toml @@ -1,7 +1,8 @@ [package] name = "dropshot-authorization-header" -version = "0.1.0" -edition = "2021" +version.workspace = true +edition.workspace = true +publish.workspace = true # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/rustfmt.toml b/rustfmt.toml new file mode 100644 index 00000000..92844e03 --- /dev/null +++ b/rustfmt.toml @@ -0,0 +1,2 @@ +style_edition = "2021" +edition = "2024" diff --git a/v-api-installer/Cargo.toml b/v-api-installer/Cargo.toml index 107deb64..c4b5c377 100644 --- a/v-api-installer/Cargo.toml +++ b/v-api-installer/Cargo.toml @@ -1,7 +1,8 @@ [package] name = "v-api-installer" -version = "0.2.0" -edition = "2021" +version.workspace = true +edition.workspace = true +publish.workspace = true [lib] name = "v_api_installer" diff --git a/v-api-param/Cargo.toml b/v-api-param/Cargo.toml index c6a29afd..75e61178 100644 --- a/v-api-param/Cargo.toml +++ b/v-api-param/Cargo.toml @@ -1,7 +1,8 @@ [package] name = "v-api-param" -version = "0.2.0" -edition = "2021" +version.workspace = true +edition.workspace = true +publish.workspace = true [dependencies] secrecy = { workspace = true, features = ["serde"] } diff --git a/v-api-permission-derive/Cargo.toml b/v-api-permission-derive/Cargo.toml index 9abe58d2..15f4b49a 100644 --- a/v-api-permission-derive/Cargo.toml +++ b/v-api-permission-derive/Cargo.toml @@ -1,7 +1,8 @@ [package] name = "v-api-permission-derive" -version = "0.2.0" -edition = "2021" +version.workspace = true +edition.workspace = true +publish.workspace = true [lib] proc-macro = true diff --git a/v-api/Cargo.toml b/v-api/Cargo.toml index 81583595..490e4857 100644 --- a/v-api/Cargo.toml +++ b/v-api/Cargo.toml @@ -1,7 +1,8 @@ [package] name = "v-api" -version = "0.2.0" -edition = "2021" +version.workspace = true +edition.workspace = true +publish.workspace = true [features] default = ["sagas"] diff --git a/v-api/src/context/mod.rs b/v-api/src/context/mod.rs index b73abdb3..86302be6 100644 --- a/v-api/src/context/mod.rs +++ b/v-api/src/context/mod.rs @@ -494,7 +494,7 @@ where tracing::debug!(?mapped_permissions, "Computed mapping permissions"); tracing::debug!(?mapped_groups, "Computed mapped groups"); - let user = match api_user_providers.len() { + match api_user_providers.len() { 0 => { tracing::info!( ?mapped_permissions, @@ -585,9 +585,7 @@ where "Multiple providers for external id found".to_string(), ))) } - }; - - user + } } pub async fn generate_access_token( diff --git a/v-api/src/secrets.rs b/v-api/src/secrets.rs index a4f95604..84c8a5b5 100644 --- a/v-api/src/secrets.rs +++ b/v-api/src/secrets.rs @@ -24,7 +24,7 @@ impl JsonSchema for OpenApiSecretString { true } - fn json_schema(_: &mut schemars::gen::SchemaGenerator) -> schemars::schema::Schema { + fn json_schema(_: &mut schemars::r#gen::SchemaGenerator) -> schemars::schema::Schema { SchemaObject { instance_type: Some(InstanceType::String.into()), ..Default::default() diff --git a/v-model/Cargo.toml b/v-model/Cargo.toml index 2d580018..b4f31561 100644 --- a/v-model/Cargo.toml +++ b/v-model/Cargo.toml @@ -1,7 +1,8 @@ [package] name = "v-model" -version = "0.2.0" -edition = "2021" +version.workspace = true +edition.workspace = true +publish.workspace = true # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/v-model/src/saga/jsonschema.rs b/v-model/src/saga/jsonschema.rs index d5457942..ad3669ad 100644 --- a/v-model/src/saga/jsonschema.rs +++ b/v-model/src/saga/jsonschema.rs @@ -16,7 +16,7 @@ impl JsonSchema for SagaDagWrapper { "SagaDag".to_string() } - fn json_schema(gen: &mut schemars::gen::SchemaGenerator) -> schemars::schema::Schema { + fn json_schema(generator: &mut schemars::r#gen::SchemaGenerator) -> schemars::schema::Schema { use schemars::schema::*; // Define the InternalNode enum schema @@ -38,7 +38,7 @@ impl JsonSchema for SagaDagWrapper { let mut inner_props = schemars::Map::new(); inner_props.insert( "params".to_string(), - gen.subschema_for::(), + generator.subschema_for::(), ); inner_props }, @@ -82,15 +82,15 @@ impl JsonSchema for SagaDagWrapper { let mut inner_props = schemars::Map::new(); inner_props.insert( "name".to_string(), - gen.subschema_for::(), + generator.subschema_for::(), ); inner_props.insert( "label".to_string(), - gen.subschema_for::(), + generator.subschema_for::(), ); inner_props.insert( "action_name".to_string(), - gen.subschema_for::(), + generator.subschema_for::(), ); inner_props }, @@ -128,11 +128,11 @@ impl JsonSchema for SagaDagWrapper { let mut inner_props = schemars::Map::new(); inner_props.insert( "name".to_string(), - gen.subschema_for::(), + generator.subschema_for::(), ); inner_props.insert( "value".to_string(), - gen.subschema_for::(), + generator.subschema_for::(), ); inner_props }, @@ -166,11 +166,11 @@ impl JsonSchema for SagaDagWrapper { let mut inner_props = schemars::Map::new(); inner_props.insert( "saga_name".to_string(), - gen.subschema_for::(), + generator.subschema_for::(), ); inner_props.insert( "params_node_name".to_string(), - gen.subschema_for::(), + generator.subschema_for::(), ); inner_props }, @@ -207,7 +207,7 @@ impl JsonSchema for SagaDagWrapper { let mut inner_props = schemars::Map::new(); inner_props.insert( "name".to_string(), - gen.subschema_for::(), + generator.subschema_for::(), ); inner_props }, @@ -262,7 +262,7 @@ impl JsonSchema for SagaDagWrapper { instance_type: Some(InstanceType::Array.into()), array: Some(Box::new(ArrayValidation { items: Some(SingleOrVec::Single(Box::new( - gen.subschema_for::(), + generator.subschema_for::(), ))), ..Default::default() })), @@ -294,7 +294,7 @@ impl JsonSchema for SagaDagWrapper { instance_type: Some(InstanceType::Array.into()), array: Some(Box::new(ArrayValidation { items: Some(SingleOrVec::Single(Box::new( - gen.subschema_for::>(), + generator.subschema_for::>(), ))), min_items: Some(3), max_items: Some(3), @@ -347,7 +347,7 @@ impl JsonSchema for SagaDagWrapper { let mut props = schemars::Map::new(); props.insert( "saga_name".to_string(), - gen.subschema_for::(), + generator.subschema_for::(), ); props.insert( "graph".to_string(), @@ -355,11 +355,11 @@ impl JsonSchema for SagaDagWrapper { ); props.insert( "start_node".to_string(), - gen.subschema_for::(), + generator.subschema_for::(), ); props.insert( "end_node".to_string(), - gen.subschema_for::(), + generator.subschema_for::(), ); props }, diff --git a/v-model/src/storage/postgres.rs b/v-model/src/storage/postgres.rs index 5daaaf5c..bae8b074 100644 --- a/v-model/src/storage/postgres.rs +++ b/v-model/src/storage/postgres.rs @@ -838,17 +838,17 @@ impl OAuthClientStore for PostgresStore { )); // Only include secrets that have not been deleted - if let Some(secret) = secret { - if secret.deleted_at.is_none() { - value.1.push(secret.into()); - } + if let Some(secret) = secret + && secret.deleted_at.is_none() + { + value.1.push(secret.into()); } // Only include redirect URIs that have not been deleted - if let Some(redirect) = redirect { - if redirect.deleted_at.is_none() { - value.2.push(redirect.into()); - } + if let Some(redirect) = redirect + && redirect.deleted_at.is_none() + { + value.2.push(redirect.into()); } clients diff --git a/xtask/Cargo.toml b/xtask/Cargo.toml index 04750ac7..9aa29d8e 100644 --- a/xtask/Cargo.toml +++ b/xtask/Cargo.toml @@ -1,7 +1,8 @@ [package] name = "xtask" -version = "0.1.0" -edition = "2021" +version.workspace = true +edition.workspace = true +publish.workspace = true [dependencies] clap = { workspace = true }