Format a count with singular/plural word.
(count: usize, word: &str)
| 530 | |
| 531 | /// Format a count with singular/plural word. |
| 532 | pub(crate) fn format_count(count: usize, word: &str) -> String { |
| 533 | if count == 1 { |
| 534 | format!("{} {}", count, word) |
| 535 | } else { |
| 536 | format!("{} {}s", count, word) |
| 537 | } |
| 538 | } |
| 539 | |
| 540 | // Tests |
| 541 |
nothing calls this directly
no outgoing calls
no test coverage detected