MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / format_count

Function format_count

atomic-cli/src/commands/restore.rs:642–648  ·  view source on GitHub ↗

Format a count with singular/plural word.

(count: usize, word: &str)

Source from the content-addressed store, hash-verified

640
641/// Format a count with singular/plural word.
642pub(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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected