mirror of
https://github.com/eza-community/eza.git
synced 2026-10-11 22:30:00 +00:00
fix(loc): satisfy newer clippy and stabilise powertest.yaml
- remove redundant #[must_use] on Report::languages (double_must_use) - use is_multiple_of in the share-bar renderer (manual_is_multiple_of) - drop a pre-existing needless double-borrow in a view.rs test - reformat the powertest.yaml comment into yamlfmt's fixed-point form (verified stable across repeated yamlfmt runs)
This commit is contained in:
committed by
Christina Sørensen
parent
4a7bfa58fc
commit
b0fdb0d6e0
+1
-2
@@ -183,8 +183,7 @@ commands:
|
||||
? - -i
|
||||
- --inode
|
||||
:
|
||||
? # so only the bare forms are generated here.
|
||||
- null # --loc and --code take their mode via `=` only (lines/percent/both),
|
||||
? - null # --loc/--code take modes via `=` only, so just the bare forms
|
||||
- --loc
|
||||
: prefix: -l
|
||||
? - null
|
||||
|
||||
@@ -230,7 +230,6 @@ impl Report {
|
||||
}
|
||||
|
||||
/// The per-language rows, ordered by language name.
|
||||
#[must_use]
|
||||
pub fn languages(&self) -> impl Iterator<Item = &LangStat> {
|
||||
self.languages.values()
|
||||
}
|
||||
|
||||
+1
-1
@@ -608,7 +608,7 @@ mod tests {
|
||||
#[test]
|
||||
fn deduce_time_types_changed_word() {
|
||||
assert_eq!(
|
||||
TimeTypes::deduce(&&mock_cli(vec!["--time", "changed"])),
|
||||
TimeTypes::deduce(&mock_cli(vec!["--time", "changed"])),
|
||||
Ok(TimeTypes {
|
||||
modified: false,
|
||||
changed: true,
|
||||
|
||||
+1
-1
@@ -254,7 +254,7 @@ fn bar(value: usize, max: usize) -> String {
|
||||
let units = units.max(1);
|
||||
|
||||
let mut bar = "█".repeat(units / 8);
|
||||
if units % 8 > 0 {
|
||||
if !units.is_multiple_of(8) {
|
||||
bar.push(EIGHTHS[units % 8 - 1]);
|
||||
}
|
||||
bar
|
||||
|
||||
Reference in New Issue
Block a user