Format the local state for display.
(entries: &[HistoryEntry])
| 280 | |
| 281 | /// Format the local state for display. |
| 282 | fn format_local_state(entries: &[HistoryEntry]) -> String { |
| 283 | if let Some(entry) = entries.last() { |
| 284 | let short_state = &entry.state.to_base32()[..12]; |
| 285 | format!("{} ({} changes)", short_state, entries.len()) |
| 286 | } else { |
| 287 | "(empty)".to_string() |
| 288 | } |
| 289 | } |
| 290 | |
| 291 | /// Format the remote state for display. |
| 292 | fn format_remote_state(state: &StateResponse, entries: &[ChangelistEntry]) -> String { |
no test coverage detected