Drop redundant trim() before split_whitespace()
split_whitespace already skips leading and trailing whitespace, so the trim() call is redundant and trips clippy::trim_split_whitespace.
This commit is contained in:
@@ -40,8 +40,7 @@ impl std::ops::Deref for ConfigFile {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn read_sid_from_stat(stat: &str) -> u32 {
|
fn read_sid_from_stat(stat: &str) -> u32 {
|
||||||
stat.trim()
|
stat.split_whitespace()
|
||||||
.split_whitespace()
|
|
||||||
.nth(5)
|
.nth(5)
|
||||||
.expect("missing field 6 in /proc/self/stat")
|
.expect("missing field 6 in /proc/self/stat")
|
||||||
.parse()
|
.parse()
|
||||||
|
|||||||
Reference in New Issue
Block a user