freedomlayer/offset

help: remove this `mut` warnings and compile errors

Closed this issue · 4 comments

I tried to compile the project with the latest Rust nightly, and got lots of strange warnings that look like this:

warning: variable does not need to be mutable
  --> src/security_module/client.rs:90:31
   |
90 |         handle.spawn(sm.then(|_| Ok(())));
   |                               ^ help: remove this `mut`

warning: variable does not need to be mutable
   --> src/security_module/client.rs:115:31
    |
115 |         handle.spawn(sm.then(|_| Ok(())));
    |                               ^ help: remove this `mut`

error: variable does not need to be mutable
   --> src/timer.rs:153:19
    |
153 |             .map(|_| tm.create_client())
    |                   ^ help: remove this `mut`

It looks like a Rust bug to me, as no mut is there.

It seems like this is related to the NLL feature. I noticed that it will take some work if we want to avoid using this feature.
Our options are to wait with this, or possibly pin to an older Rust nightly version.

Currently, Niko is rewriting the borrow checker for NLL again. I pin to 04-19 nightly build, we can move forward step by step.

Cool. I'm closing this.