chore: release v1.2.1
release / verify (push) Successful in 25s
ci / rust (push) Successful in 48s
ci / lint-yaml (push) Successful in 4s
release / linux-amd64 (push) Successful in 30s

This commit is contained in:
2026-07-05 02:53:49 +02:00
parent fface10081
commit 549025dfe7
5 changed files with 22 additions and 4 deletions
+12 -1
View File
@@ -1669,6 +1669,7 @@ fn format_gauge_label(progress: f64) -> String {
}
fn ascii_time(value: &str) -> Vec<String> {
const GLYPH_WIDTH: usize = 10;
let mut rows = vec![String::new(); 7];
for ch in value.chars() {
let glyph = ascii_glyph(ch);
@@ -1676,7 +1677,7 @@ fn ascii_time(value: &str) -> Vec<String> {
if !row.is_empty() {
row.push(' ');
}
row.push_str(part);
row.push_str(&format!("{part:<GLYPH_WIDTH$}"));
}
}
rows
@@ -2044,6 +2045,16 @@ mod tests {
assert!(keys.contains(&FieldKey::CustomCommands));
}
#[test]
fn ascii_time_rows_have_equal_width() {
let rows = ascii_time("14:45:27");
let width = rows.first().map(String::len).unwrap_or(0);
assert_eq!(rows.len(), 7);
assert!(width > 0);
assert!(rows.iter().all(|row| row.len() == width));
}
fn visible_field_keys(config: &Config) -> Vec<FieldKey> {
visible_fields(config)
.into_iter()