Fix reference to unexisting method

This commit is contained in:
Roberto Vidal 2018-11-09 13:12:16 +01:00
parent 227e836e04
commit 2faf44250d

View File

@ -241,8 +241,9 @@ impl JsValue {
/// value into wasm linear memory, encoded as UTF-8, and returns it as a
/// Rust `String`.
///
/// To avoid the copying and re-encoding, consider the `as_js_string()`
/// method instead.
/// To avoid the copying and re-encoding, consider the
/// `JsString::try_from()` function from [js-sys](https://docs.rs/js-sys)
/// instead.
///
/// If this JS value is not an instance of a string or if it's not valid
/// utf-8 then this returns `None`.