seed
seed copied to clipboard
[0.8.x] WebSocket and too early dropped closure
Commit 08c4ce15255ac8d03df5315796e7b63e624e2987 introduced some bug:
Uncaught Error: closure invoked recursively or destroyed already
at imports.wbg.__wbindgen_throw
at wasm_bindgen::throw_str::ha13545fa78d0389b
at <dyn core::ops::function::Fn<(A,)>+Output = R as wasm_bindgen::closure::WasmClosure>::describe::invoke::he801481bf9a481f4
at __wbg_adapter_42
at WebSocket.real
I suppose, one of the unused fields were used to prevent from dropping the closure mentioned above.
Rust says the field is unused, because its only use is to run drop() in the right moment.
We should mark that field with #[allow(unused)] (or some more specific lint from the "unused" group) instead of removing it.