refactor(who): make --limit optional (unlimited default) and fix clippy sort lints

Change the `who` command's --limit flag from default=20 to optional,
so omitting it returns all results. This matches the behavior users
expect when they want a complete expert/workload/active/overlap listing
without an arbitrary cap.

Also applies clippy-recommended sort improvements:
- who/reviews: sort_by(|a,b| b.count.cmp(&a.count)) -> sort_by_key with Reverse
- drift: same pattern for frequency sorting

Adds Theme::color_icon() helper to DRY the stage-icon coloring pattern
used in sync output (was inline closure, now shared method).
This commit is contained in:
teernisse
2026-02-18 16:27:48 -05:00
parent 30ed02c694
commit ea6e45e43f
6 changed files with 25 additions and 15 deletions

View File

@@ -448,6 +448,15 @@ impl Theme {
Style::new()
}
}
/// Apply semantic color to a stage-completion icon glyph.
pub fn color_icon(icon: &str, has_errors: bool) -> String {
if has_errors {
Self::warning().render(icon)
} else {
Self::success().render(icon)
}
}
}
// ─── Shared Formatters ───────────────────────────────────────────────────────