Skip to content

Commit

Permalink
Cargo format
Browse files Browse the repository at this point in the history
  • Loading branch information
juhaku committed Mar 13, 2023
1 parent 53b96c3 commit 44cd43e
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 7 deletions.
3 changes: 2 additions & 1 deletion utoipa-gen/src/component/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1610,7 +1610,8 @@ impl ToTokens for SchemaProperty<'_> {
// add default minimum feature only when there is no explicit minimum
// provided
if !features
.iter().any(|feature| matches!(&feature, Feature::Minimum(_)))
.iter()
.any(|feature| matches!(&feature, Feature::Minimum(_)))
{
features.push(Minimum::new(0f64, type_path.span()).into());
}
Expand Down
2 changes: 1 addition & 1 deletion utoipa-gen/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ use self::path::response::derive::{IntoResponses, ToResponse};
/// * and it does not have _`serde_with`_ _[`double_option`](https://docs.rs/serde_with/latest/serde_with/rust/double_option/index.html)_
/// * and it does not have default value provided with serde _`default`_
/// attribute
///
///
/// Field is considered _`nullable`_ when field type is _`Option`_.
///
/// ## Xml attribute Configuration Options
Expand Down
4 changes: 1 addition & 3 deletions utoipa-swagger-ui/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ const SWAGGER_UI_DIST_ZIP: &str = "swagger-ui-4.15.5";

fn main() {
println!("cargo:rerun-if-changed=res/{SWAGGER_UI_DIST_ZIP}.zip");
println!(
"cargo:rustc-env=UTOIPA_SWAGGER_UI_VERSION={SWAGGER_UI_DIST_ZIP}"
);
println!("cargo:rustc-env=UTOIPA_SWAGGER_UI_VERSION={SWAGGER_UI_DIST_ZIP}");

let target_dir = env::var("OUT_DIR").unwrap();
println!("cargo:rustc-env=UTOIPA_SWAGGER_DIR={}", &target_dir);
Expand Down
2 changes: 1 addition & 1 deletion utoipa/src/openapi/encoding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,4 @@ impl EncodingBuilder {
pub fn allow_reserved(mut self, allow_reserved: Option<bool>) -> Self {
set_value!(self allow_reserved allow_reserved)
}
}
}
1 change: 0 additions & 1 deletion utoipa/src/openapi/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,6 @@ fn is_false(value: &bool) -> bool {
!*value
}


impl Object {
/// Initialize a new [`Object`] with default [`SchemaType`]. This effectively same as calling
/// `Object::with_type(SchemaType::Object)`.
Expand Down

0 comments on commit 44cd43e

Please sign in to comment.