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

Function format_local_state

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

Format the local state for display.

(entries: &[HistoryEntry])

Source from the content-addressed store, hash-verified

519
520/// Format the local state for display.
521fn format_local_state(entries: &[HistoryEntry]) -> String {
522 if let Some(entry) = entries.last() {
523 let short_state = &entry.state.to_base32()[..12];
524 format!("{} ({} changes)", short_state, entries.len())
525 } else {
526 "(empty)".to_string()
527 }
528}
529
530/// Format the remote state for display.
531fn format_remote_state(state: &StateResponse, entries: &[ChangelistEntry]) -> String {

Callers 2

display_state_comparisonFunction · 0.70

Calls 2

lastMethod · 0.80
to_base32Method · 0.45

Tested by

no test coverage detected