diff --git a/src/si/angle.rs b/src/si/angle.rs index 3a885103..cb80b027 100644 --- a/src/si/angle.rs +++ b/src/si/angle.rs @@ -129,38 +129,6 @@ where } } -mod convert { - use super::*; - - impl ::lib::convert::From for Angle - where - U: ::si::Units + ?Sized, - V: ::num::Num + ::Conversion, - { - fn from(t: V) -> Self { - Angle { - dimension: ::lib::marker::PhantomData, - units: ::lib::marker::PhantomData, - value: t, - } - } - } - - storage_types! { - use super::*; - - impl ::lib::convert::From> for V - where - U: ::si::Units + ?Sized, - V: ::num::Num + ::Conversion, - { - fn from(t: Angle) -> Self { - t.value - } - } - } -} - #[cfg(test)] mod tests { storage_types! { @@ -170,14 +138,6 @@ mod tests { use si::quantities::*; use tests::Test; - #[test] - fn from() { - let r1: Angle = Angle::::from(V::one()); - let r2: Angle = V::one().into(); - let _: V = V::from(r1); - let _: V = r2.into(); - } - #[test] fn check_units() { Test::assert_eq(&Angle::new::(V::from_f64(2.0 * PI).unwrap()), diff --git a/src/si/solid_angle.rs b/src/si/solid_angle.rs index 30a118dd..bb58c365 100644 --- a/src/si/solid_angle.rs +++ b/src/si/solid_angle.rs @@ -46,38 +46,6 @@ impl SolidAngle<::si::SI, f64> { }; } -mod convert { - use super::*; - - impl ::lib::convert::From for SolidAngle - where - U: ::si::Units + ?Sized, - V: ::num::Num + ::Conversion, - { - fn from(t: V) -> Self { - SolidAngle { - dimension: ::lib::marker::PhantomData, - units: ::lib::marker::PhantomData, - value: t, - } - } - } - - storage_types! { - use super::*; - - impl ::lib::convert::From> for V - where - U: ::si::Units + ?Sized, - V: ::num::Num + ::Conversion, - { - fn from(t: SolidAngle) -> Self { - t.value - } - } - } -} - #[cfg(test)] mod tests { storage_types! { @@ -87,14 +55,6 @@ mod tests { use si::quantities::*; use tests::Test; - #[test] - fn from() { - let r1: SolidAngle = SolidAngle::::from(V::one()); - let r2: SolidAngle = V::one().into(); - let _: V = V::from(r1); - let _: V = r2.into(); - } - #[test] fn check_units() { Test::assert_eq(&SolidAngle::new::(V::from_f64(4.0 * PI).unwrap()),