Skip to content

Commit 9fcdfc5

Browse files
committed
[minor] Clippy
1 parent 44ee5e2 commit 9fcdfc5

3 files changed

Lines changed: 6 additions & 9 deletions

File tree

heim-cpu/src/sys/linux/freq.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ impl ops::Add<CpuFrequency> for CpuFrequency {
4646
(None, None) => None,
4747
};
4848

49-
CpuFrequency { current, max, min }
49+
CpuFrequency { current, min, max }
5050
}
5151
}
5252

@@ -69,7 +69,7 @@ fn _frequencies() -> impl Iterator<Item = Result<CpuFrequency>> {
6969
let max = max_freq(&path);
7070
let min = min_freq(&path);
7171

72-
Ok(CpuFrequency { current, max, min })
72+
Ok(CpuFrequency { current, min, max })
7373
})
7474
}
7575

heim-disk/src/sys/linux/counters.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,12 @@ impl FromStr for IoCounters {
104104
Ok(IoCounters {
105105
name,
106106
read_count,
107-
read_merged_count,
108-
read_bytes,
109107
write_count,
110-
write_merged_count,
108+
read_bytes,
111109
write_bytes,
112110
busy_time,
111+
read_merged_count,
112+
write_merged_count,
113113
})
114114
}
115115
}

heim-process/src/sys/unix/env.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,7 @@ impl<'e> Iterator for EnvironmentIter<'e> {
9393
type Item = (&'e OsStr, &'e OsStr);
9494

9595
fn next(&mut self) -> Option<Self::Item> {
96-
match self.0.next() {
97-
Some((k, v)) => Some((k.as_os_str(), v.as_os_str())),
98-
None => None,
99-
}
96+
self.0.next().map(|(k, v)| (k.as_os_str(), v.as_os_str()))
10097
}
10198

10299
fn size_hint(&self) -> (usize, Option<usize>) {

0 commit comments

Comments
 (0)