Skip to content

Commit

Permalink
cargo clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
hansl committed Mar 29, 2024
1 parent 90ec36f commit a6fbb76
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions core/interop/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ impl<T: TryFromJs> TryFromJsArgument for T {
}

/// An argument that when used in a JS function will empty the list
/// of JS arguments as JsValues. This can be used for having the
/// of JS arguments as `JsValue`s. This can be used for having the
/// rest of the arguments in a function.
#[derive(Debug, Clone)]
pub struct JsRest(pub Vec<JsValue>);
Expand Down Expand Up @@ -269,12 +269,11 @@ pub fn into_js_module() {
context.run_jobs();

// Checking if the final promise didn't return an error.
if promise_result.state().as_fulfilled().is_none() {
panic!(
"module didn't execute successfully! Promise: {:?}",
promise_result.state()
);
};
assert!(
promise_result.state().as_fulfilled().is_some(),
"module didn't execute successfully! Promise: {:?}",
promise_result.state()
);

assert_eq!(*foo_count.borrow(), 2);
assert_eq!(*bar_count.borrow(), 15);
Expand Down

0 comments on commit a6fbb76

Please sign in to comment.