fix: drop redundant trim before split_whitespace
CI caught `clippy::trim_split_whitespace` on Rust 1.94: `split_whitespace()` already skips leading/trailing whitespace, so `.trim()` first is redundant. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -219,7 +219,7 @@ fn discover_linux() -> SystemDnsInfo {
|
||||
#[cfg(any(target_os = "linux", test))]
|
||||
fn iter_nameservers(content: &str) -> impl Iterator<Item = &str> {
|
||||
content.lines().filter_map(|line| {
|
||||
let mut parts = line.trim().split_whitespace();
|
||||
let mut parts = line.split_whitespace();
|
||||
(parts.next() == Some("nameserver")).then_some(())?;
|
||||
parts.next()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user