Fix typo in example code block (#1971)

This commit is contained in:
Noritada Kobayashi
2020-01-23 00:33:05 +09:00
committed by Alex Crichton
parent ae6f4a9c87
commit 580c7a714a

View File

@ -15,7 +15,7 @@ implements the `std::future::Future` trait which allows naturally using it in an
```rust
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?;
Ok(result)
}