js-sys: Promise methods should take JS things by shared reference

This commit is contained in:
Nick Fitzgerald
2018-08-09 13:08:30 -07:00
parent f85fd0e2ad
commit e3011d629e
2 changed files with 5 additions and 5 deletions

View File

@ -54,7 +54,7 @@
//! pub fn new() -> NextTick {
//! // Create a resolved promise that will run its callbacks on the next
//! // tick of the micro task queue.
//! let promise = js_sys::Promise::resolve(JsValue::NULL);
//! let promise = js_sys::Promise::resolve(&JsValue::NULL);
//! // Convert the promise into a `JsFuture`.
//! let inner = JsFuture::from(promise);
//! NextTick { inner }