diff options
-rw-r--r-- | src/main.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs index 3c7c815..28af074 100644 --- a/src/main.rs +++ b/src/main.rs | |||
@@ -132,8 +132,8 @@ fn radix_fmt(number: f64, obase: usize) -> Result<String, CalcError> { | |||
132 | 132 | ||
133 | fn thousand_sep(inp: &str) -> String { | 133 | fn thousand_sep(inp: &str) -> String { |
134 | let mut result_string = String::new(); | 134 | let mut result_string = String::new(); |
135 | for (i,c) in inp.to_string().chars().rev().enumerate(){ | 135 | for (i,c) in inp.to_string().chars().rev().enumerate() { |
136 | if i % 3 == 0 && i != 0 && c.to_string() != "-"{ | 136 | if i % 3 == 0 && i != 0 && c.to_string() != "-" { |
137 | result_string.push(','); | 137 | result_string.push(','); |
138 | } | 138 | } |
139 | result_string.push(c) | 139 | result_string.push(c) |