mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-25 02:31:35 +00:00
Fix typo in example code block (#1971)
This commit is contained in:
committed by
Alex Crichton
parent
ae6f4a9c87
commit
580c7a714a
@ -15,7 +15,7 @@ implements the `std::future::Future` trait which allows naturally using it in an
|
|||||||
|
|
||||||
```rust
|
```rust
|
||||||
async fn get_from_js() -> Result<JsValue, JsValue> {
|
async fn get_from_js() -> Result<JsValue, JsValue> {
|
||||||
let promise = js_sys::Promise::resolved(&42.into());
|
let promise = js_sys::Promise::resolve(&42.into());
|
||||||
let result = wasm_bindgen_futures::JsFuture::from(promise).await?;
|
let result = wasm_bindgen_futures::JsFuture::from(promise).await?;
|
||||||
Ok(result)
|
Ok(result)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user