refactor: simplify raw_string creation
This commit is contained in:
parent
3c20174ecb
commit
ef9d07923e
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue