(value: u64)
| 646 | } |
| 647 | |
| 648 | fn format_number(value: u64) -> String { |
| 649 | let digits = value.to_string(); |
| 650 | let mut out = String::with_capacity(digits.len() + (digits.len() / 3)); |
| 651 | for (idx, ch) in digits.chars().rev().enumerate() { |
| 652 | if idx > 0 && idx % 3 == 0 { |
| 653 | out.push(','); |
| 654 | } |
| 655 | out.push(ch); |
| 656 | } |
| 657 | out.chars().rev().collect() |
| 658 | } |
nothing calls this directly
no outgoing calls
no test coverage detected