diff --git a/src/_macros.rs b/src/_macros.rs index 0743c791f..811045819 100644 --- a/src/_macros.rs +++ b/src/_macros.rs @@ -325,7 +325,7 @@ macro_rules! impl_f64_newtypes { ($type: ty) => { impl std::fmt::Display for $type { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - write!(f, "{}({})", stringify!($type), self.0) + write!(f, "{}", self.0) } } diff --git a/src/lib.rs b/src/lib.rs index ba670ee8c..f596e5b23 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -525,17 +525,17 @@ mod tests { let mut output = String::new(); std::fmt::write(&mut output, format_args!("{}", x)) .expect("Error occurred while trying to write in String"); - assert_eq!(output, "Position(1)".to_string()); + assert_eq!(output, "1".to_string()); let x = Time::from(1.0); let mut output = String::new(); std::fmt::write(&mut output, format_args!("{}", x)) .expect("Error occurred while trying to write in String"); - assert_eq!(output, "Time(1)".to_string()); + assert_eq!(output, "1".to_string()); let x = Location::from(1.0); let mut output = String::new(); std::fmt::write(&mut output, format_args!("{}", x)) .expect("Error occurred while trying to write in String"); - assert_eq!(output, "Location(1)".to_string()); + assert_eq!(output, "1".to_string()); } }