From 577bb8354c34aaa48a64bfebb7e9de58245b0ae6 Mon Sep 17 00:00:00 2001 From: Chrislearn Young Date: Wed, 11 Sep 2024 06:49:56 +0800 Subject: [PATCH] fix ci and compile error --- crates/oapi/src/openapi/schema/all_of.rs | 4 ++-- crates/oapi/src/openapi/schema/any_of.rs | 4 ++-- crates/oapi/src/openapi/schema/array.rs | 4 ++-- crates/oapi/src/openapi/schema/object.rs | 4 ++-- crates/oapi/src/openapi/schema/one_of.rs | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/crates/oapi/src/openapi/schema/all_of.rs b/crates/oapi/src/openapi/schema/all_of.rs index 4d944feae..25886fb97 100644 --- a/crates/oapi/src/openapi/schema/all_of.rs +++ b/crates/oapi/src/openapi/schema/all_of.rs @@ -226,9 +226,9 @@ mod tests { #[test] fn test_allof_with_extensions() { let expected = json!("value"); - let json_value = AllOf::new().extensions(Some( + let json_value = AllOf::new().extensions( [("x-some-extension".to_string(), expected.clone())].into(), - )); + ); let value = serde_json::to_value(&json_value).unwrap(); assert_eq!(value.get("x-some-extension"), Some(&expected)); diff --git a/crates/oapi/src/openapi/schema/any_of.rs b/crates/oapi/src/openapi/schema/any_of.rs index 745b67c78..e1307401d 100644 --- a/crates/oapi/src/openapi/schema/any_of.rs +++ b/crates/oapi/src/openapi/schema/any_of.rs @@ -226,9 +226,9 @@ mod tests { #[test] fn test_anyof_with_extensions() { let expected = json!("value"); - let json_value = AnyOf::new().extensions(Some( + let json_value = AnyOf::new().extensions( [("x-some-extension".to_string(), expected.clone())].into(), - )); + ); let value = serde_json::to_value(&json_value).unwrap(); assert_eq!(value.get("x-some-extension"), Some(&expected)); diff --git a/crates/oapi/src/openapi/schema/array.rs b/crates/oapi/src/openapi/schema/array.rs index d9389f2cb..a6969848a 100644 --- a/crates/oapi/src/openapi/schema/array.rs +++ b/crates/oapi/src/openapi/schema/array.rs @@ -271,9 +271,9 @@ mod tests { #[test] fn test_array_with_extensions() { let expected = json!("value"); - let json_value = Array::default().extensions(Some( + let json_value = Array::default().extensions( [("x-some-extension".to_string(), expected.clone())].into(), - )); + ); let value = serde_json::to_value(&json_value).unwrap(); assert_eq!(value.get("x-some-extension"), Some(&expected)); diff --git a/crates/oapi/src/openapi/schema/object.rs b/crates/oapi/src/openapi/schema/object.rs index 96f327292..bafa5a479 100644 --- a/crates/oapi/src/openapi/schema/object.rs +++ b/crates/oapi/src/openapi/schema/object.rs @@ -472,9 +472,9 @@ mod tests { #[test] fn test_object_with_extensions() { let expected = json!("value"); - let json_value = Object::new().extensions(Some( + let json_value = Object::new().extensions( [("x-some-extension".to_string(), expected.clone())].into(), - )); + ); let value = serde_json::to_value(&json_value).unwrap(); assert_eq!(value.get("x-some-extension"), Some(&expected)); diff --git a/crates/oapi/src/openapi/schema/one_of.rs b/crates/oapi/src/openapi/schema/one_of.rs index 6b45520ed..f6eabbd20 100644 --- a/crates/oapi/src/openapi/schema/one_of.rs +++ b/crates/oapi/src/openapi/schema/one_of.rs @@ -226,9 +226,9 @@ mod tests { #[test] fn test_oneof_with_extensions() { let expected = json!("value"); - let json_value = OneOf::new().extensions(Some( + let json_value = OneOf::new().extensions( [("x-some-extension".to_string(), expected.clone())].into(), - )); + ); let value = serde_json::to_value(&json_value).unwrap(); assert_eq!(value.get("x-some-extension"), Some(&expected));