You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm a beginner of rust.
I want move of ownership to closure, but Fn applies to closures that don’t move captured values out of their body and that don’t mutate captured values.
T: Fn(Event) -> Option + 'static
modify to
T: FnMut(Event) -> Option + 'static
I want move of ownership to closure, but Fn applies to closures that don’t move captured values out of their body and that don’t mutate captured values.
That's because you cannot.
You could use a global variable for that (that's unsafe but it works if your program is simple enough).
Or an Arc<Mutex<T>>
when i use grab, i cant modify environment variable;
The text was updated successfully, but these errors were encountered: