diff --git a/cargo-typify/tests/outputs/attr.rs b/cargo-typify/tests/outputs/attr.rs index bae2d959..6e325084 100644 --- a/cargo-typify/tests/outputs/attr.rs +++ b/cargo-typify/tests/outputs/attr.rs @@ -23,8 +23,8 @@ pub mod error { Self(value.into()) } } - impl From for ConversionError { - fn from(value: String) -> Self { + impl From<::std::string::String> for ConversionError { + fn from(value: ::std::string::String) -> Self { Self(value.into()) } } diff --git a/cargo-typify/tests/outputs/builder.rs b/cargo-typify/tests/outputs/builder.rs index d3bdd8e0..02c1e417 100644 --- a/cargo-typify/tests/outputs/builder.rs +++ b/cargo-typify/tests/outputs/builder.rs @@ -23,8 +23,8 @@ pub mod error { Self(value.into()) } } - impl From for ConversionError { - fn from(value: String) -> Self { + impl From<::std::string::String> for ConversionError { + fn from(value: ::std::string::String) -> Self { Self(value.into()) } } diff --git a/cargo-typify/tests/outputs/custom_btree_map.rs b/cargo-typify/tests/outputs/custom_btree_map.rs index 27214973..08d8514a 100644 --- a/cargo-typify/tests/outputs/custom_btree_map.rs +++ b/cargo-typify/tests/outputs/custom_btree_map.rs @@ -23,8 +23,8 @@ pub mod error { Self(value.into()) } } - impl From for ConversionError { - fn from(value: String) -> Self { + impl From<::std::string::String> for ConversionError { + fn from(value: ::std::string::String) -> Self { Self(value.into()) } } diff --git a/cargo-typify/tests/outputs/derive.rs b/cargo-typify/tests/outputs/derive.rs index d66ce803..f1b13efd 100644 --- a/cargo-typify/tests/outputs/derive.rs +++ b/cargo-typify/tests/outputs/derive.rs @@ -23,8 +23,8 @@ pub mod error { Self(value.into()) } } - impl From for ConversionError { - fn from(value: String) -> Self { + impl From<::std::string::String> for ConversionError { + fn from(value: ::std::string::String) -> Self { Self(value.into()) } } diff --git a/cargo-typify/tests/outputs/multi_derive.rs b/cargo-typify/tests/outputs/multi_derive.rs index 4f259a28..7140b2a6 100644 --- a/cargo-typify/tests/outputs/multi_derive.rs +++ b/cargo-typify/tests/outputs/multi_derive.rs @@ -23,8 +23,8 @@ pub mod error { Self(value.into()) } } - impl From for ConversionError { - fn from(value: String) -> Self { + impl From<::std::string::String> for ConversionError { + fn from(value: ::std::string::String) -> Self { Self(value.into()) } } diff --git a/cargo-typify/tests/outputs/no-builder.rs b/cargo-typify/tests/outputs/no-builder.rs index 16c8ae1e..69204118 100644 --- a/cargo-typify/tests/outputs/no-builder.rs +++ b/cargo-typify/tests/outputs/no-builder.rs @@ -23,8 +23,8 @@ pub mod error { Self(value.into()) } } - impl From for ConversionError { - fn from(value: String) -> Self { + impl From<::std::string::String> for ConversionError { + fn from(value: ::std::string::String) -> Self { Self(value.into()) } } diff --git a/typify-impl/src/lib.rs b/typify-impl/src/lib.rs index a9cf8c24..ab2cbe0b 100644 --- a/typify-impl/src/lib.rs +++ b/typify-impl/src/lib.rs @@ -906,8 +906,8 @@ impl TypeSpace { Self(value.into()) } } - impl From for ConversionError { - fn from(value: String) -> Self { + impl From<::std::string::String> for ConversionError { + fn from(value: ::std::string::String) -> Self { Self(value.into()) } } diff --git a/typify-impl/src/type_entry.rs b/typify-impl/src/type_entry.rs index be2ee246..ae98240c 100644 --- a/typify-impl/src/type_entry.rs +++ b/typify-impl/src/type_entry.rs @@ -1429,11 +1429,11 @@ impl TypeEntry { value.parse() } } - impl ::std::convert::TryFrom for #type_name { + impl ::std::convert::TryFrom<::std::string::String> for #type_name { type Error = <#inner_type_name as ::std::str::FromStr>::Err; - fn try_from(value: String) -> + fn try_from(value: ::std::string::String) -> ::std::result::Result { value.parse() @@ -1514,7 +1514,7 @@ impl TypeEntry { ].into_iter().collect()), ..::std::default::Default::default() }; - schema.subschemas().not = Some( + schema.subschemas().not = ::std::option::Option::Some( ::std::boxed::Box::new(not.into()) ); schema.into() @@ -1836,7 +1836,7 @@ impl TypeEntry { let item = inner_ty.type_ident(type_space, type_mod); // TODO we'll want this to be a Set of some kind, but we need // to get the derives right first. - quote! { Vec<#item> } + quote! { ::std::vec::Vec<#item> } } TypeEntryDetails::Tuple(items) => { diff --git a/typify-impl/tests/generator.out b/typify-impl/tests/generator.out index c74219f7..10bf4dcb 100644 --- a/typify-impl/tests/generator.out +++ b/typify-impl/tests/generator.out @@ -19,8 +19,8 @@ mod types { Self(value.into()) } } - impl From for ConversionError { - fn from(value: String) -> Self { + impl From<::std::string::String> for ConversionError { + fn from(value: ::std::string::String) -> Self { Self(value.into()) } } diff --git a/typify-impl/tests/github.out b/typify-impl/tests/github.out index 3cede02a..972c9519 100644 --- a/typify-impl/tests/github.out +++ b/typify-impl/tests/github.out @@ -18,8 +18,8 @@ pub mod error { Self(value.into()) } } - impl From for ConversionError { - fn from(value: String) -> Self { + impl From<::std::string::String> for ConversionError { + fn from(value: ::std::string::String) -> Self { Self(value.into()) } } diff --git a/typify-impl/tests/vega.out b/typify-impl/tests/vega.out index ca8894dc..d3f24c45 100644 --- a/typify-impl/tests/vega.out +++ b/typify-impl/tests/vega.out @@ -18,8 +18,8 @@ pub mod error { Self(value.into()) } } - impl From for ConversionError { - fn from(value: String) -> Self { + impl From<::std::string::String> for ConversionError { + fn from(value: ::std::string::String) -> Self { Self(value.into()) } } diff --git a/typify/tests/schemas/arrays-and-tuples.rs b/typify/tests/schemas/arrays-and-tuples.rs index 7a741a74..0b96fa23 100644 --- a/typify/tests/schemas/arrays-and-tuples.rs +++ b/typify/tests/schemas/arrays-and-tuples.rs @@ -19,8 +19,8 @@ pub mod error { Self(value.into()) } } - impl From for ConversionError { - fn from(value: String) -> Self { + impl From<::std::string::String> for ConversionError { + fn from(value: ::std::string::String) -> Self { Self(value.into()) } } @@ -39,20 +39,20 @@ pub mod error { #[doc = r" "] #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)] #[serde(transparent)] -pub struct ArraySansItems(pub Vec<::serde_json::Value>); +pub struct ArraySansItems(pub ::std::vec::Vec<::serde_json::Value>); impl ::std::ops::Deref for ArraySansItems { - type Target = Vec<::serde_json::Value>; - fn deref(&self) -> &Vec<::serde_json::Value> { + type Target = ::std::vec::Vec<::serde_json::Value>; + fn deref(&self) -> &::std::vec::Vec<::serde_json::Value> { &self.0 } } -impl ::std::convert::From for Vec<::serde_json::Value> { +impl ::std::convert::From for ::std::vec::Vec<::serde_json::Value> { fn from(value: ArraySansItems) -> Self { value.0 } } -impl ::std::convert::From> for ArraySansItems { - fn from(value: Vec<::serde_json::Value>) -> Self { +impl ::std::convert::From<::std::vec::Vec<::serde_json::Value>> for ArraySansItems { + fn from(value: ::std::vec::Vec<::serde_json::Value>) -> Self { Self(value) } } diff --git a/typify/tests/schemas/deny-list.rs b/typify/tests/schemas/deny-list.rs index bfed6edf..d3ae8e28 100644 --- a/typify/tests/schemas/deny-list.rs +++ b/typify/tests/schemas/deny-list.rs @@ -19,8 +19,8 @@ pub mod error { Self(value.into()) } } - impl From for ConversionError { - fn from(value: String) -> Self { + impl From<::std::string::String> for ConversionError { + fn from(value: ::std::string::String) -> Self { Self(value.into()) } } diff --git a/typify/tests/schemas/extraneous-enum.rs b/typify/tests/schemas/extraneous-enum.rs index 8fcd63bc..da0b403e 100644 --- a/typify/tests/schemas/extraneous-enum.rs +++ b/typify/tests/schemas/extraneous-enum.rs @@ -19,8 +19,8 @@ pub mod error { Self(value.into()) } } - impl From for ConversionError { - fn from(value: String) -> Self { + impl From<::std::string::String> for ConversionError { + fn from(value: ::std::string::String) -> Self { Self(value.into()) } } diff --git a/typify/tests/schemas/id-or-name.rs b/typify/tests/schemas/id-or-name.rs index 4f2ae528..5880bd22 100644 --- a/typify/tests/schemas/id-or-name.rs +++ b/typify/tests/schemas/id-or-name.rs @@ -19,8 +19,8 @@ pub mod error { Self(value.into()) } } - impl From for ConversionError { - fn from(value: String) -> Self { + impl From<::std::string::String> for ConversionError { + fn from(value: ::std::string::String) -> Self { Self(value.into()) } } diff --git a/typify/tests/schemas/maps.rs b/typify/tests/schemas/maps.rs index 3fecef01..8e58f38a 100644 --- a/typify/tests/schemas/maps.rs +++ b/typify/tests/schemas/maps.rs @@ -19,8 +19,8 @@ pub mod error { Self(value.into()) } } - impl From for ConversionError { - fn from(value: String) -> Self { + impl From<::std::string::String> for ConversionError { + fn from(value: ::std::string::String) -> Self { Self(value.into()) } } diff --git a/typify/tests/schemas/maps_custom.rs b/typify/tests/schemas/maps_custom.rs index ab08862a..c5751d83 100644 --- a/typify/tests/schemas/maps_custom.rs +++ b/typify/tests/schemas/maps_custom.rs @@ -19,8 +19,8 @@ pub mod error { Self(value.into()) } } - impl From for ConversionError { - fn from(value: String) -> Self { + impl From<::std::string::String> for ConversionError { + fn from(value: ::std::string::String) -> Self { Self(value.into()) } } diff --git a/typify/tests/schemas/merged-schemas.rs b/typify/tests/schemas/merged-schemas.rs index 7f317516..b3dc3689 100644 --- a/typify/tests/schemas/merged-schemas.rs +++ b/typify/tests/schemas/merged-schemas.rs @@ -19,8 +19,8 @@ pub mod error { Self(value.into()) } } - impl From for ConversionError { - fn from(value: String) -> Self { + impl From<::std::string::String> for ConversionError { + fn from(value: ::std::string::String) -> Self { Self(value.into()) } } @@ -534,9 +534,9 @@ impl ::std::convert::TryFrom<&str> for MergeNumberBounds { value.parse() } } -impl ::std::convert::TryFrom for MergeNumberBounds { +impl ::std::convert::TryFrom<::std::string::String> for MergeNumberBounds { type Error = ::Err; - fn try_from(value: String) -> ::std::result::Result { + fn try_from(value: ::std::string::String) -> ::std::result::Result { value.parse() } } @@ -675,9 +675,9 @@ impl ::std::convert::TryFrom<&str> for NarrowNumber { value.parse() } } -impl ::std::convert::TryFrom for NarrowNumber { +impl ::std::convert::TryFrom<::std::string::String> for NarrowNumber { type Error = <::std::num::NonZeroU64 as ::std::str::FromStr>::Err; - fn try_from(value: String) -> ::std::result::Result { + fn try_from(value: ::std::string::String) -> ::std::result::Result { value.parse() } } diff --git a/typify/tests/schemas/more_types.rs b/typify/tests/schemas/more_types.rs index cfc229a5..7319bf89 100644 --- a/typify/tests/schemas/more_types.rs +++ b/typify/tests/schemas/more_types.rs @@ -19,8 +19,8 @@ pub mod error { Self(value.into()) } } - impl From for ConversionError { - fn from(value: String) -> Self { + impl From<::std::string::String> for ConversionError { + fn from(value: ::std::string::String) -> Self { Self(value.into()) } } diff --git a/typify/tests/schemas/multiple-instance-types.rs b/typify/tests/schemas/multiple-instance-types.rs index 53a77459..f84c1814 100644 --- a/typify/tests/schemas/multiple-instance-types.rs +++ b/typify/tests/schemas/multiple-instance-types.rs @@ -19,8 +19,8 @@ pub mod error { Self(value.into()) } } - impl From for ConversionError { - fn from(value: String) -> Self { + impl From<::std::string::String> for ConversionError { + fn from(value: ::std::string::String) -> Self { Self(value.into()) } } diff --git a/typify/tests/schemas/noisy-types.rs b/typify/tests/schemas/noisy-types.rs index f6bed45a..782ee518 100644 --- a/typify/tests/schemas/noisy-types.rs +++ b/typify/tests/schemas/noisy-types.rs @@ -19,8 +19,8 @@ pub mod error { Self(value.into()) } } - impl From for ConversionError { - fn from(value: String) -> Self { + impl From<::std::string::String> for ConversionError { + fn from(value: ::std::string::String) -> Self { Self(value.into()) } } @@ -114,9 +114,9 @@ impl ::std::convert::TryFrom<&str> for IntegerBs { value.parse() } } -impl ::std::convert::TryFrom for IntegerBs { +impl ::std::convert::TryFrom<::std::string::String> for IntegerBs { type Error = ::Err; - fn try_from(value: String) -> ::std::result::Result { + fn try_from(value: ::std::string::String) -> ::std::result::Result { value.parse() } } diff --git a/typify/tests/schemas/property-pattern.rs b/typify/tests/schemas/property-pattern.rs index 2c55aa81..565d5906 100644 --- a/typify/tests/schemas/property-pattern.rs +++ b/typify/tests/schemas/property-pattern.rs @@ -19,8 +19,8 @@ pub mod error { Self(value.into()) } } - impl From for ConversionError { - fn from(value: String) -> Self { + impl From<::std::string::String> for ConversionError { + fn from(value: ::std::string::String) -> Self { Self(value.into()) } } diff --git a/typify/tests/schemas/reflexive.rs b/typify/tests/schemas/reflexive.rs index 1cfc18b1..579989e5 100644 --- a/typify/tests/schemas/reflexive.rs +++ b/typify/tests/schemas/reflexive.rs @@ -19,8 +19,8 @@ pub mod error { Self(value.into()) } } - impl From for ConversionError { - fn from(value: String) -> Self { + impl From<::std::string::String> for ConversionError { + fn from(value: ::std::string::String) -> Self { Self(value.into()) } } diff --git a/typify/tests/schemas/rust-collisions.rs b/typify/tests/schemas/rust-collisions.rs index 08f0ac88..0f8c032b 100644 --- a/typify/tests/schemas/rust-collisions.rs +++ b/typify/tests/schemas/rust-collisions.rs @@ -19,8 +19,8 @@ pub mod error { Self(value.into()) } } - impl From for ConversionError { - fn from(value: String) -> Self { + impl From<::std::string::String> for ConversionError { + fn from(value: ::std::string::String) -> Self { Self(value.into()) } } diff --git a/typify/tests/schemas/simple-types.rs b/typify/tests/schemas/simple-types.rs index 3f197c09..db0433d8 100644 --- a/typify/tests/schemas/simple-types.rs +++ b/typify/tests/schemas/simple-types.rs @@ -19,8 +19,8 @@ pub mod error { Self(value.into()) } } - impl From for ConversionError { - fn from(value: String) -> Self { + impl From<::std::string::String> for ConversionError { + fn from(value: ::std::string::String) -> Self { Self(value.into()) } } diff --git a/typify/tests/schemas/string-enum-with-default.rs b/typify/tests/schemas/string-enum-with-default.rs index 74073853..d0489707 100644 --- a/typify/tests/schemas/string-enum-with-default.rs +++ b/typify/tests/schemas/string-enum-with-default.rs @@ -19,8 +19,8 @@ pub mod error { Self(value.into()) } } - impl From for ConversionError { - fn from(value: String) -> Self { + impl From<::std::string::String> for ConversionError { + fn from(value: ::std::string::String) -> Self { Self(value.into()) } } diff --git a/typify/tests/schemas/type-with-modified-generation.rs b/typify/tests/schemas/type-with-modified-generation.rs index 1ff62b6d..07e2b99a 100644 --- a/typify/tests/schemas/type-with-modified-generation.rs +++ b/typify/tests/schemas/type-with-modified-generation.rs @@ -19,8 +19,8 @@ pub mod error { Self(value.into()) } } - impl From for ConversionError { - fn from(value: String) -> Self { + impl From<::std::string::String> for ConversionError { + fn from(value: ::std::string::String) -> Self { Self(value.into()) } } diff --git a/typify/tests/schemas/types-with-defaults.rs b/typify/tests/schemas/types-with-defaults.rs index 383ece76..9393fc7d 100644 --- a/typify/tests/schemas/types-with-defaults.rs +++ b/typify/tests/schemas/types-with-defaults.rs @@ -19,8 +19,8 @@ pub mod error { Self(value.into()) } } - impl From for ConversionError { - fn from(value: String) -> Self { + impl From<::std::string::String> for ConversionError { + fn from(value: ::std::string::String) -> Self { Self(value.into()) } } @@ -303,9 +303,9 @@ impl ::std::convert::TryFrom<&str> for UInt { value.parse() } } -impl ::std::convert::TryFrom for UInt { +impl ::std::convert::TryFrom<::std::string::String> for UInt { type Error = ::Err; - fn try_from(value: String) -> ::std::result::Result { + fn try_from(value: ::std::string::String) -> ::std::result::Result { value.parse() } } diff --git a/typify/tests/schemas/types-with-more-impls.rs b/typify/tests/schemas/types-with-more-impls.rs index 6b2e3ddd..3fc3bcb0 100644 --- a/typify/tests/schemas/types-with-more-impls.rs +++ b/typify/tests/schemas/types-with-more-impls.rs @@ -19,8 +19,8 @@ pub mod error { Self(value.into()) } } - impl From for ConversionError { - fn from(value: String) -> Self { + impl From<::std::string::String> for ConversionError { + fn from(value: ::std::string::String) -> Self { Self(value.into()) } } diff --git a/typify/tests/schemas/untyped-enum-with-null.rs b/typify/tests/schemas/untyped-enum-with-null.rs index 6aa768a4..665275e2 100644 --- a/typify/tests/schemas/untyped-enum-with-null.rs +++ b/typify/tests/schemas/untyped-enum-with-null.rs @@ -19,8 +19,8 @@ pub mod error { Self(value.into()) } } - impl From for ConversionError { - fn from(value: String) -> Self { + impl From<::std::string::String> for ConversionError { + fn from(value: ::std::string::String) -> Self { Self(value.into()) } } diff --git a/typify/tests/schemas/various-enums-json-schema.rs b/typify/tests/schemas/various-enums-json-schema.rs index 9add93c7..3820bbe7 100644 --- a/typify/tests/schemas/various-enums-json-schema.rs +++ b/typify/tests/schemas/various-enums-json-schema.rs @@ -19,8 +19,8 @@ pub mod error { Self(value.into()) } } - impl From for ConversionError { - fn from(value: String) -> Self { + impl From<::std::string::String> for ConversionError { + fn from(value: ::std::string::String) -> Self { Self(value.into()) } } @@ -1061,7 +1061,7 @@ impl ::schemars::JsonSchema for NotBlockSize { ), ..::std::default::Default::default() }; - schema.subschemas().not = Some(::std::boxed::Box::new(not.into())); + schema.subschemas().not = ::std::option::Option::Some(::std::boxed::Box::new(not.into())); schema.into() } } diff --git a/typify/tests/schemas/various-enums.rs b/typify/tests/schemas/various-enums.rs index b252bcd3..7ca5aee1 100644 --- a/typify/tests/schemas/various-enums.rs +++ b/typify/tests/schemas/various-enums.rs @@ -19,8 +19,8 @@ pub mod error { Self(value.into()) } } - impl From for ConversionError { - fn from(value: String) -> Self { + impl From<::std::string::String> for ConversionError { + fn from(value: ::std::string::String) -> Self { Self(value.into()) } } diff --git a/typify/tests/schemas/x-rust-type.rs b/typify/tests/schemas/x-rust-type.rs index 809d390f..83ea654f 100644 --- a/typify/tests/schemas/x-rust-type.rs +++ b/typify/tests/schemas/x-rust-type.rs @@ -19,8 +19,8 @@ pub mod error { Self(value.into()) } } - impl From for ConversionError { - fn from(value: String) -> Self { + impl From<::std::string::String> for ConversionError { + fn from(value: ::std::string::String) -> Self { Self(value.into()) } }