Skip to content

Commit

Permalink
Rebase fallout and review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcrichton committed Aug 6, 2018
1 parent e4ba33f commit 87e01bc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions src/cast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ where
{
/// Test whether this JS value is an instance of the type `T`.
///
/// This commit performs a dynamic check (at runtime) using the JS
/// This method performs a dynamic check (at runtime) using the JS
/// `instanceof` operator. This method returns `self instanceof T`.
fn is_instance_of<T>(&self) -> bool
where
Expand All @@ -32,7 +32,7 @@ where
///
/// This method will return `Err(self)` is `self.is_instance_of::<T>()`
/// returns `false`, and otherwise it will return `Ok(T)` manufactured with
/// an unchecked cast (verified safe via the `instanceof` operation).
/// an unchecked cast (verified correct via the `instanceof` operation).
fn dyn_into<T>(self) -> Result<T, Self>
where
T: JsCast,
Expand All @@ -49,7 +49,7 @@ where
///
/// This method will return `None` is `self.is_instance_of::<T>()`
/// returns `false`, and otherwise it will return `Some(&T)` manufactured
/// with an unchecked cast (verified safe via the `instanceof` operation).
/// with an unchecked cast (verified correct via the `instanceof` operation).
fn dyn_ref<T>(&self) -> Option<&T>
where
T: JsCast,
Expand All @@ -66,8 +66,8 @@ where
///
/// This method will return `None` is `self.is_instance_of::<T>()`
/// returns `false`, and otherwise it will return `Some(&mut T)`
/// manufactured with an unchecked cast (verified safe via the `instanceof`
/// operation).
/// manufactured with an unchecked cast (verified correct via the
/// `instanceof` operation).
fn dyn_mut<T>(&mut self) -> Option<&mut T>
where
T: JsCast,
Expand All @@ -85,7 +85,7 @@ where
/// `self` and `T` are simple wrappers around `JsValue`. This method **does
/// not check whether `self` is an instance of `T`**. If used incorrectly
/// then this method may cause runtime exceptions in both Rust and JS, this
/// shoudl be used with caution.
/// should be used with caution.
fn unchecked_into<T>(self) -> T
where
T: JsCast,
Expand Down
2 changes: 1 addition & 1 deletion tests/wasm/jscast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use wasm_bindgen::JsCast;
use wasm_bindgen::prelude::*;
use wasm_bindgen_test::*;

#[wasm_bindgen(module = "tests/wasm/jscast.js", version = "*")]
#[wasm_bindgen(module = "tests/wasm/jscast.js")]
extern {
type JsCast1;
#[wasm_bindgen(constructor)]
Expand Down

0 comments on commit 87e01bc

Please sign in to comment.