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

Function format_count

atomic-cli/tests/it/push_integration_test.rs:128–134  ·  view source on GitHub ↗

Format a count with singular/plural suffix.

(count: usize, singular: &str)

Source from the content-addressed store, hash-verified

126
127/// Format a count with singular/plural suffix.
128fn format_count(count: usize, singular: &str) -> String {
129 if count == 1 {
130 format!("{} {}", count, singular)
131 } else {
132 format!("{} {}s", count, singular)
133 }
134}
135
136// Test Helpers
137

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected