diff --git a/Cargo.lock b/Cargo.lock index 00afd2e..5dfd04c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -231,14 +231,14 @@ dependencies = [ [[package]] name = "nutype" -version = "0.4.1" +version = "0.4.2" dependencies = [ "nutype_macros", ] [[package]] name = "nutype_macros" -version = "0.4.1" +version = "0.4.2" dependencies = [ "cfg-if", "kinded", diff --git a/examples/no_std_example/Cargo.lock b/examples/no_std_example/Cargo.lock index c7d4dd6..88119f1 100644 --- a/examples/no_std_example/Cargo.lock +++ b/examples/no_std_example/Cargo.lock @@ -47,14 +47,14 @@ dependencies = [ [[package]] name = "nutype" -version = "0.4.1" +version = "0.4.2" dependencies = [ "nutype_macros", ] [[package]] name = "nutype_macros" -version = "0.4.1" +version = "0.4.2" dependencies = [ "cfg-if", "kinded", diff --git a/nutype_macros/src/float/models.rs b/nutype_macros/src/float/models.rs index 28bc074..bdc4fac 100644 --- a/nutype_macros/src/float/models.rs +++ b/nutype_macros/src/float/models.rs @@ -75,9 +75,7 @@ impl TypeTrait for FloatDeriveTrait { pub type FloatRawGuard = RawGuard, SpannedFloatValidator>; pub type FloatGuard = Guard, FloatValidator>; -pub trait FloatType { - fn float_inner_type() -> FloatInnerType; -} +pub trait FloatType {} macro_rules! define_float_inner_type { ($($tp:ty => $variant:ident),*) => { @@ -88,9 +86,6 @@ macro_rules! define_float_inner_type { $( impl FloatType for $tp { - fn float_inner_type() -> FloatInnerType { - FloatInnerType::$variant - } } )* diff --git a/nutype_macros/src/integer/models.rs b/nutype_macros/src/integer/models.rs index 5505c8b..9fb3cd3 100644 --- a/nutype_macros/src/integer/models.rs +++ b/nutype_macros/src/integer/models.rs @@ -75,9 +75,7 @@ impl TypeTrait for IntegerDeriveTrait { pub type IntegerRawGuard = RawGuard, SpannedIntegerValidator>; pub type IntegerGuard = Guard, IntegerValidator>; -pub trait IntegerType { - fn integer_inner_type() -> IntegerInnerType; -} +pub trait IntegerType {} macro_rules! define_integer_inner_type { ($($tp:ty => $variant:ident),*) => { @@ -88,9 +86,6 @@ macro_rules! define_integer_inner_type { $( impl IntegerType for $tp { - fn integer_inner_type() -> IntegerInnerType { - IntegerInnerType::$variant - } } )*