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
32 | io.add_method("initialize", |_| {
| ---------- ^^^ this closure implements `FnMut`, not `Fn`
| |
| the requirement to implement `Fn` derives from here
33 | check_initialized!(state);
34 | state.initialized = true;
| ----- closure is `FnMut` because it mutates the variable `state` here
I'm not sure how to resolve this. I'm new to Rust.
The text was updated successfully, but these errors were encountered:
@Kampfkarren the methods can be called by multiple threads, os they have to be Sync. Please wrap any mutability into RwLock, Mutex or use Atomic* structs.
I want to use the following code:
This gives me the error:
I'm not sure how to resolve this. I'm new to Rust.
The text was updated successfully, but these errors were encountered: