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

Function format_count

atomic-cli/src/commands/push/mod.rs:172–178  ·  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

170
171 /// Helper: format a count with auto-pluralization (singular + "s").
172 fn format_count(count: usize, singular: &str) -> String {
173 if count == 1 {
174 format!("1 {}", singular)
175 } else {
176 format!("{} {}s", count, singular)
177 }
178 }
179
180 #[test]
181 fn test_push_reexported() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected