Format the local state for display.
(entries: &[HistoryEntry])
| 519 | |
| 520 | /// Format the local state for display. |
| 521 | fn 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. |
| 531 | fn format_remote_state(state: &StateResponse, entries: &[ChangelistEntry]) -> String { |
no test coverage detected