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

Function format_remote_state

atomic-cli/tests/fixtures/helpers_c5.rs:531–538  ·  view source on GitHub ↗

Format the remote state for display.

(state: &StateResponse, entries: &[ChangelistEntry])

Source from the content-addressed store, hash-verified

529
530/// Format the remote state for display.
531fn format_remote_state(state: &StateResponse, entries: &[ChangelistEntry]) -> String {
532 if let Some(merkle_str) = state.merkle() {
533 let short_state = &merkle_str[..12.min(merkle_str.len())];
534 format!("{} ({} changes)", short_state, entries.len())
535 } else {
536 "(empty)".to_string()
537 }
538}
539
540/// Format a count with singular/plural suffix.
541///

Callers 1

display_state_comparisonFunction · 0.70

Calls 2

merkleMethod · 0.80
lenMethod · 0.45

Tested by

no test coverage detected