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

Function format_count

atomic-cli/src/commands/pull/mod.rs:174–180  ·  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

172
173 /// Helper: format a count with auto-pluralization (singular + "s").
174 fn format_count(count: usize, singular: &str) -> String {
175 if count == 1 {
176 format!("1 {}", singular)
177 } else {
178 format!("{} {}s", count, singular)
179 }
180 }
181
182 /// Verify that the Pull struct is properly re-exported and constructible.
183 #[test]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected