Merge pull request #1073 from daxpedda/patch-1

Fix typo in "wasm_bindgen::JsCast" trait docs
This commit is contained in:
Alex Crichton 2018-12-01 13:17:11 -06:00 committed by GitHub
commit 46f70d3630
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -30,7 +30,7 @@ where
/// Performs a dynamic cast (checked at runtime) of this value into the
/// target type `T`.
///
/// This method will return `Err(self)` is `self.is_instance_of::<T>()`
/// This method will return `Err(self)` if `self.is_instance_of::<T>()`
/// returns `false`, and otherwise it will return `Ok(T)` manufactured with
/// an unchecked cast (verified correct via the `instanceof` operation).
fn dyn_into<T>(self) -> Result<T, Self>
@ -47,7 +47,7 @@ where
/// Performs a dynamic cast (checked at runtime) of this value into the
/// target type `T`.
///
/// This method will return `None` is `self.is_instance_of::<T>()`
/// This method will return `None` if `self.is_instance_of::<T>()`
/// returns `false`, and otherwise it will return `Some(&T)` manufactured
/// with an unchecked cast (verified correct via the `instanceof` operation).
fn dyn_ref<T>(&self) -> Option<&T>