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

Function format_manifest_state

atomic-cli/src/commands/push/helpers.rs:466–477  ·  view source on GitHub ↗

Format a manifest's state for display.

(manifest: &ViewManifest)

Source from the content-addressed store, hash-verified

464
465/// Format a manifest's state for display.
466fn format_manifest_state(manifest: &ViewManifest) -> String {
467 if manifest.changes.is_empty() {
468 "(empty)".to_string()
469 } else {
470 let state = manifest.state.to_base32();
471 format!(
472 "{} ({} changes)",
473 &state[..12.min(state.len())],
474 manifest.changes.len()
475 )
476 }
477}
478
479/// Format a count with singular/plural suffix.
480///

Calls 2

is_emptyMethod · 0.45
to_base32Method · 0.45

Tested by 1