Skip to content

Commit

Permalink
[minor] Clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
daladim committed Jun 25, 2021
1 parent 44ee5e2 commit 4adea5c
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 11 deletions.
4 changes: 2 additions & 2 deletions heim-cpu/src/sys/linux/freq.rs
Expand Up @@ -46,7 +46,7 @@ impl ops::Add<CpuFrequency> for CpuFrequency {
(None, None) => None,
};

CpuFrequency { current, max, min }
CpuFrequency { current, min, max }
}
}

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

Ok(CpuFrequency { current, max, min })
Ok(CpuFrequency { current, min, max })
})
}

Expand Down
6 changes: 3 additions & 3 deletions heim-disk/src/sys/linux/counters.rs
Expand Up @@ -104,12 +104,12 @@ impl FromStr for IoCounters {
Ok(IoCounters {
name,
read_count,
read_merged_count,
read_bytes,
write_count,
write_merged_count,
read_bytes,
write_bytes,
busy_time,
read_merged_count,
write_merged_count,
})
}
}
Expand Down
2 changes: 1 addition & 1 deletion heim-memory/src/sys/macos/memory.rs
Expand Up @@ -68,8 +68,8 @@ pub async fn memory() -> Result<Memory> {
Ok(Memory {
total,
available,
free,
used,
free,
active,
inactive,
wire,
Expand Down
2 changes: 1 addition & 1 deletion heim-memory/src/sys/macos/swap.rs
Expand Up @@ -48,8 +48,8 @@ pub async fn swap() -> Result<Swap> {

Ok(Swap {
total,
free,
used,
free,
sin,
sout,
})
Expand Down
5 changes: 1 addition & 4 deletions heim-process/src/sys/unix/env.rs
Expand Up @@ -93,10 +93,7 @@ impl<'e> Iterator for EnvironmentIter<'e> {
type Item = (&'e OsStr, &'e OsStr);

fn next(&mut self) -> Option<Self::Item> {
match self.0.next() {
Some((k, v)) => Some((k.as_os_str(), v.as_os_str())),
None => None,
}
self.0.next().map(|(k, v)| (k.as_os_str(), v.as_os_str()))
}

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

0 comments on commit 4adea5c

Please sign in to comment.