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

Function format_count

atomic-cli/src/commands/clone/mod.rs:160–166  ·  view source on GitHub ↗

Helper: format a count with auto-pluralization (singular + "s").

(count: usize, singular: &str)

Source from the content-addressed store, hash-verified

158
159 /// Helper: format a count with auto-pluralization (singular + "s").
160 fn format_count(count: usize, singular: &str) -> String {
161 if count == 1 {
162 format!("1 {}", singular)
163 } else {
164 format!("{} {}s", count, singular)
165 }
166 }
167
168 /// Verify that the Clone struct is properly re-exported and constructible.
169 #[test]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected