bvaisvil / zenith

Zenith - sort of like top or htop but with zoom-able charts, CPU, GPU, network, and disk usage
MIT License
2.63k stars 67 forks source link

Remove unused `mut` #136

Closed MilesCranmer closed 1 year ago

MilesCranmer commented 1 year ago

FYI I'm not sure if this is correct or not, but cargo told me to submit this fix:

warning: variable does not need to be mutable
   --> src/metrics/mod.rs:663:17
    |
663 | ...   let mut zd = self.disks.entry(name).or_insert(ZDisk::fro...
    |           ----^^
    |           |
    |           help: remove this `mut`
    |
    = note: `#[warn(unused_mut)]` on by default

warning: variable does not need to be mutable
   --> src/metrics/mod.rs:728:13
    |
728 |         let mut overall = self
    |             ----^^^^^^^
    |             |
    |             help: remove this `mut`
bvaisvil commented 1 year ago

Thanks for the PR. I think it's probably right. The reference does not need to be mutable.