Format the local state for display.
(entries: &[HistoryEntry])
| 461 | |
| 462 | /// Format the local state for display. |
| 463 | fn format_local_state(entries: &[HistoryEntry]) -> String { |
| 464 | if let Some(entry) = entries.last() { |
| 465 | let short_state = &entry.state.to_base32()[..12]; |
| 466 | format!("{} ({} changes)", short_state, entries.len()) |
| 467 | } else { |
| 468 | "(empty)".to_string() |
| 469 | } |
| 470 | } |
| 471 | |
| 472 | /// Format the remote state for display. |
| 473 | fn format_remote_state(state: &StateResponse, entries: &[ChangelistEntry]) -> String { |
no test coverage detected