Skip to content

Commit

Permalink
Update passing-rust-closures-to-js.md (#3859)
Browse files Browse the repository at this point in the history
  • Loading branch information
DougAnderson444 authored Feb 28, 2024
1 parent b9ccb8f commit 0023077
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions guide/src/reference/passing-rust-closures-to-js.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,6 @@ return but the JavaScript closure still needs to be valid!
For this scenario, you need the `Closure` type, which is defined in the
`wasm_bindgen` crate, exported in `wasm_bindgen::prelude`, and represents a
"long lived" closure.
The `Closure` type is currently behind a feature which needs to be enabled:

```toml
[dependencies]
wasm-bindgen = {version = "^0.2", features = ["nightly"]}
```

The validity of the JavaScript closure is tied to the lifetime of the `Closure`
in Rust. **Once a `Closure` is dropped, it will deallocate its internal memory
Expand Down

0 comments on commit 0023077

Please sign in to comment.