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

Function format_count

atomic-cli/src/commands/remove.rs:532–538  ·  view source on GitHub ↗

Format a count with singular/plural word.

(count: usize, word: &str)

Source from the content-addressed store, hash-verified

530
531/// Format a count with singular/plural word.
532pub(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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected