diff --git a/src/formatting.rs b/src/formatting.rs index fa18bd2..e893d9b 100644 --- a/src/formatting.rs +++ b/src/formatting.rs @@ -46,7 +46,7 @@ fn test_character_readdition() { } pub fn get_significant_digits(n: &Float) -> usize { - let raw_string: String = format!("{n}").chars().filter(|c| *c != '.').collect(); + let raw_string = n.to_string().replace('.', ""); let mut consecutive_zeros = 0; let mut consecutive_nines = 0;