Future compatibility warning
retep998 opened this issue · comments
Compiling reg-watcher v0.1.0
warning[E0382]: assign to part of moved value: `self`
--> C:\Users\appveyor\.cargo\registry\src\github.com-1ecc6299db9ec823\reg-watcher-0.1.0\src\lib.rs:282:9
|
260 | mut self,
| -------- move occurs because `self` has type `Watcher`, which does not implement the `Copy` trait
...
267 | let handle = builder.spawn(move || {
| ------- value moved into closure here
...
271 | self.notify_filter,
| ---- variable moved due to use in closure
...
282 | self.handle = Some(handle);
| ^^^^^^^^^^^ value partially assigned here after move
|
= warning: this error has been downgraded to a warning for backwards compatibility with previous releases
= warning: this represents potential undefined behavior in your code and this warning will become a hard error in the future
= note: for more information, try `rustc --explain E0729`
Fixed, thanks for reminding me.