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:
Razvan Dimescu
2026-04-08 04:44:07 +03:00
parent 68c7fc4130
commit 9c9986b49d

View File

@@ -219,7 +219,7 @@ fn discover_linux() -> SystemDnsInfo {
#[cfg(any(target_os = "linux", test))] #[cfg(any(target_os = "linux", test))]
fn iter_nameservers(content: &str) -> impl Iterator<Item = &str> { fn iter_nameservers(content: &str) -> impl Iterator<Item = &str> {
content.lines().filter_map(|line| { 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() == Some("nameserver")).then_some(())?;
parts.next() parts.next()
}) })