Closed
Description
error[E0594]: cannot assign to captured outer variable in an `Fn` closure
--> main.rs:232:9
|
225 | let mut typing_last = Instant::now();
| --------------- help: consider making `mut typing_last` mutable: `mut mut typing_last`
...
232 | typing_last = Instant::now();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
help: consider changing this closure to take self by mutable reference
--> main.rs:228:40
|
228 | input.connect_property_text_notify(move |input| {
| ________________________________________^
229 | | if typing_last.elapsed() < typing_duration {
230 | | return;
231 | | }
... |
234 | | println!("{:?}", text);
235 | | });
| |_____^
help: consider making
mut typing_last
mutable:mut mut typing_last
Sadly I can't seems to find a minimal reproduction example where this appears, but I commited all my code to a separate branch so you can look at the code (or try to compile it yourself): rust-weird-error.
I'm sorry, but that's all I have on this error.