kyoheiu / felix

tui file manager with vim-like key mapping
https://kyoheiu.dev/felix/
MIT License
708 stars 24 forks source link

variable does not need to be mutable #230

Closed 0323pin closed 1 year ago

0323pin commented 1 year ago

Hi,

Found sometime tonight to update the NetBSD package to the latest 2.6.0

Just FYI,

Compiling felix v2.6.0 (/usr/pkgsrc/wip/felix/work/felix-2.6.0)
warning: variable does not need to be mutable
   --> src/run.rs:286:49
    |
286 | ...                   let mut item = state.get_item_mut()?;
    |                           ----^^^^
    |                           |
    |                           help: remove this `mut`
    |
    = note: `#[warn(unused_mut)]` on by default

warning: variable does not need to be mutable
   --> src/run.rs:290:49
    |
290 | ...                   let mut item = state.get_item_mut()?;
    |                           ----^^^^
    |                           |
    |                           help: remove this `mut`

warning: variable does not need to be mutable
   --> src/run.rs:298:45
    |
298 | ...                   let mut item = state.get_item_mut()?;
    |                           ----^^^^
    |                           |
    |                           help: remove this `mut`

warning: variable does not need to be mutable
   --> src/run.rs:302:45
    |
302 | ...                   let mut item = state.get_item_mut()?;
    |                           ----^^^^
    |                           |
    |                           help: remove this `mut`

warning: variable does not need to be mutable
   --> src/run.rs:337:49
    |
337 | ...                   let mut item = state.get_item_mut()?;
    |                           ----^^^^
    |                           |
    |                           help: remove this `mut`

warning: variable does not need to be mutable
   --> src/run.rs:345:49
    |
345 | ...                   let mut item = state.get_item_mut()?;
    |                           ----^^^^
    |                           |
    |                           help: remove this `mut`

warning: variable does not need to be mutable
   --> src/run.rs:350:45
    |
350 | ...                   let mut item = state.get_item_mut()?;
    |                           ----^^^^
    |                           |
    |                           help: remove this `mut`

warning: variable does not need to be mutable
   --> src/run.rs:356:45
    |
356 | ...                   let mut item = state.get_item_mut()?;
    |                           ----^^^^
    |                           |
    |                           help: remove this `mut`

warning: variable does not need to be mutable
   --> src/run.rs:771:37
    |
771 | ...                   let mut item = state.get_item_mut()?;
    |                           ----^^^^
    |                           |
    |                           help: remove this `mut`

warning: variable does not need to be mutable
    --> src/state.rs:1291:13
     |
1291 |         for mut item in self.list.iter_mut() {
     |             ----^^^^
     |             |
     |             help: remove this `mut`
warning: `felix` (bin "fx") generated 10 warnings (run `cargo fix --bin "fx"` to apply 10 suggestions)
    Finished release [optimized] target(s) in 5m 42s

This is with Rust-1.71 Regards

kyoheiu commented 1 year ago

Thanks! I'll check it out.

0323pin commented 1 year ago

I see it's fixed in 7e9cd2fdcc9da62e19f3b35182b9aadb3d8af0c1 Awesome 👍