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

Function format_count

atomic-cli/src/commands/record/command.rs:214–220  ·  view source on GitHub ↗

Format a count with singular/plural suffix.

(count: usize, singular: &str)

Source from the content-addressed store, hash-verified

212
213/// Format a count with singular/plural suffix.
214pub(crate) fn format_count(count: usize, singular: &str) -> String {
215 if count == 1 {
216 format!("{} {}", count, singular)
217 } else {
218 format!("{} {}s", count, singular)
219 }
220}
221
222/// Check if stdin is a terminal (for interactive prompts).
223/// Convert an atomic_identity::Identity to atomic_core::change::Author.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected