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:
Christina Sørensen
2026-07-09 10:36:34 +02:00
committed by Christina Sørensen
parent 4a7bfa58fc
commit b0fdb0d6e0
4 changed files with 3 additions and 5 deletions
+1 -2
View File
@@ -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
-1
View File
@@ -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
View File
@@ -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
View File
@@ -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