chore: a few minor lints (#10754)

I ran this locally, using current main version of clippy:

```bash
cargo dev lint path/to/coreutils -- --workspace --all-features
```
This commit is contained in:
Yuri Astrakhan
2026-02-06 12:00:15 -08:00
committed by GitHub
parent 0a28d6542e
commit 25a43c636f
4 changed files with 4 additions and 12 deletions
+1 -1
View File
@@ -1113,7 +1113,7 @@ impl Options {
});
}
}
overriding_order.sort_by(|a, b| a.0.cmp(&b.0));
overriding_order.sort_by_key(|a| a.0);
let mut attributes = Attributes::NONE;
+1 -5
View File
@@ -421,13 +421,9 @@ impl Iterator for ParagraphStream<'_> {
let mut in_mail = false;
let mut second_done = false; // for when we use crown or tagged mode
loop {
while let Some(Line::FormatLine(fl)) = self.lines.peek() {
// peek ahead
// need to explicitly force fl out of scope before we can call self.lines.next()
let Some(Line::FormatLine(fl)) = self.lines.peek() else {
break;
};
if p_lines.is_empty() {
// first time through the loop, get things set up
// detect mail header
+1 -2
View File
@@ -3579,8 +3579,7 @@ fn get_security_context<'a>(
};
return uucore::smack::get_smack_label_for_path(&target_path)
.map(Cow::Owned)
.unwrap_or(Cow::Borrowed(SUBSTITUTE_STRING));
.map_or(Cow::Borrowed(SUBSTITUTE_STRING), Cow::Owned);
}
Cow::Borrowed(SUBSTITUTE_STRING)
+1 -4
View File
@@ -543,10 +543,7 @@ pub fn sanitize_sha2_sha3_length_str(algo_kind: AlgoKind, length: &str) -> UResu
pub fn unescape_filename(filename: &[u8]) -> (Vec<u8>, &'static str) {
let mut unescaped = Vec::with_capacity(filename.len());
let mut byte_iter = filename.iter().peekable();
loop {
let Some(byte) = byte_iter.next() else {
break;
};
while let Some(byte) = byte_iter.next() {
if *byte == b'\\' {
match byte_iter.next() {
Some(b'\\') => unescaped.push(b'\\'),