Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions typify-impl/src/type_entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1416,26 +1416,6 @@ impl TypeEntry {
Ok(Self(value.parse()?))
}
}
impl ::std::convert::TryFrom<&str> for #type_name {
type Error = <#inner_type_name as
::std::str::FromStr>::Err;

fn try_from(value: &str) ->
::std::result::Result<Self, Self::Error>
{
value.parse()
}
}
impl ::std::convert::TryFrom<String> for #type_name {
type Error = <#inner_type_name as
::std::str::FromStr>::Err;

fn try_from(value: String) ->
::std::result::Result<Self, Self::Error>
{
value.parse()
}
}
}
});

Expand Down
24 changes: 0 additions & 24 deletions typify/tests/schemas/merged-schemas.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,18 +219,6 @@ impl ::std::str::FromStr for MergeNumberBounds {
Ok(Self(value.parse()?))
}
}
impl ::std::convert::TryFrom<&str> for MergeNumberBounds {
type Error = <f64 as ::std::str::FromStr>::Err;
fn try_from(value: &str) -> ::std::result::Result<Self, Self::Error> {
value.parse()
}
}
impl ::std::convert::TryFrom<String> for MergeNumberBounds {
type Error = <f64 as ::std::str::FromStr>::Err;
fn try_from(value: String) -> ::std::result::Result<Self, Self::Error> {
value.parse()
}
}
#[doc = "`MergeStringBounds`"]
#[derive(:: serde :: Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[serde(transparent)]
Expand Down Expand Up @@ -314,18 +302,6 @@ impl ::std::str::FromStr for NarrowNumber {
Ok(Self(value.parse()?))
}
}
impl ::std::convert::TryFrom<&str> for NarrowNumber {
type Error = <::std::num::NonZeroU64 as ::std::str::FromStr>::Err;
fn try_from(value: &str) -> ::std::result::Result<Self, Self::Error> {
value.parse()
}
}
impl ::std::convert::TryFrom<String> for NarrowNumber {
type Error = <::std::num::NonZeroU64 as ::std::str::FromStr>::Err;
fn try_from(value: String) -> ::std::result::Result<Self, Self::Error> {
value.parse()
}
}
#[doc = "`OrderDependentMerge`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
pub struct OrderDependentMerge {
Expand Down
12 changes: 0 additions & 12 deletions typify/tests/schemas/noisy-types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,6 @@ impl ::std::str::FromStr for IntegerBs {
Ok(Self(value.parse()?))
}
}
impl ::std::convert::TryFrom<&str> for IntegerBs {
type Error = <u64 as ::std::str::FromStr>::Err;
fn try_from(value: &str) -> ::std::result::Result<Self, Self::Error> {
value.parse()
}
}
impl ::std::convert::TryFrom<String> for IntegerBs {
type Error = <u64 as ::std::str::FromStr>::Err;
fn try_from(value: String) -> ::std::result::Result<Self, Self::Error> {
value.parse()
}
}
#[doc = "`ObjectBs`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
pub struct ObjectBs {
Expand Down
12 changes: 0 additions & 12 deletions typify/tests/schemas/types-with-defaults.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,18 +129,6 @@ impl ::std::str::FromStr for UInt {
Ok(Self(value.parse()?))
}
}
impl ::std::convert::TryFrom<&str> for UInt {
type Error = <i64 as ::std::str::FromStr>::Err;
fn try_from(value: &str) -> ::std::result::Result<Self, Self::Error> {
value.parse()
}
}
impl ::std::convert::TryFrom<String> for UInt {
type Error = <i64 as ::std::str::FromStr>::Err;
fn try_from(value: String) -> ::std::result::Result<Self, Self::Error> {
value.parse()
}
}
#[doc = "`UIntContainer`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
pub struct UIntContainer {
Expand Down
Loading