fix: clippy warnings with --all-features (#15035)

# Description

Some more `cargo clippy --all-features` warnings from rust toolchain
1.84.1 that I forgot to fix in #14984
This commit is contained in:
zc he
2025-02-07 19:30:25 +08:00
committed by GitHub
parent 2ce5de58e6
commit fb8ac4198b
8 changed files with 13 additions and 13 deletions

View File

@ -6,7 +6,7 @@
/// The width seems to be a fixed length, but it doesn't always fit.
/// GuessWidth finds the column separation position
/// from the reference line(header) and multiple lines(body).
///
/// Briefly, the algorithm uses a histogram of spaces to find widths.
/// blanks, lines, and pos are variables used in the algorithm. The other
/// items names below are just for reference.
@ -19,7 +19,7 @@
/// spaces = " ^ ^ ^"
/// pos = 6 15 24 <- the carets show these positions
/// the items in pos map to 3's in the blanks array
///
/// Now that we have pos, we can let split() use this pos array to figure out
/// how to split all lines by comparing each index to see if there's a space.
/// So, it looks at position 6, 15, 24 and sees if it has a space in those

View File

@ -148,7 +148,7 @@ fn counter(contents: &str, span: Span) -> Value {
Value::record(record, span)
}
/// Take all the counts in `other_counts` and sum them into `accum`.
// /// Take all the counts in `other_counts` and sum them into `accum`.
// pub fn sum_counts(accum: &mut Counted, other_counts: &Counted) {
// for (counter, count) in other_counts {
// let entry = accum.entry(*counter).or_insert(0);
@ -156,7 +156,7 @@ fn counter(contents: &str, span: Span) -> Value {
// }
// }
/// Sums all the `Counted` instances into a new one.
// /// Sums all the `Counted` instances into a new one.
// pub fn sum_all_counts<'a, I>(counts: I) -> Counted
// where
// I: IntoIterator<Item = &'a Counted>,