Format a count with singular/plural word.
(count: usize, word: &str)
| 640 | |
| 641 | /// Format a count with singular/plural word. |
| 642 | pub(crate) fn format_count(count: usize, word: &str) -> String { |
| 643 | if count == 1 { |
| 644 | format!("{} {}", count, word) |
| 645 | } else { |
| 646 | format!("{} {}s", count, word) |
| 647 | } |
| 648 | } |
| 649 | |
| 650 | // Tests |
| 651 |
nothing calls this directly
no outgoing calls
no test coverage detected