summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/async_cancel.rs4
-rw-r--r--core/bindings.rs2
-rw-r--r--core/error.rs3
3 files changed, 4 insertions, 5 deletions
diff --git a/core/async_cancel.rs b/core/async_cancel.rs
index 5784f41dd..5e52d9cd1 100644
--- a/core/async_cancel.rs
+++ b/core/async_cancel.rs
@@ -644,10 +644,10 @@ mod tests {
}
}
- assert_eq!(futures.into_iter().any(|fut| !fut.is_terminated()), false);
+ assert!(!futures.into_iter().any(|fut| !fut.is_terminated()));
let cancel_handles = [cancel_now, cancel_at_0, cancel_at_1, cancel_at_4];
- assert_eq!(cancel_handles.iter().any(|c| !c.is_canceled()), false);
+ assert!(!cancel_handles.iter().any(|c| !c.is_canceled()));
}
#[tokio::test]
diff --git a/core/bindings.rs b/core/bindings.rs
index fbde856c5..a0a3a1cc4 100644
--- a/core/bindings.rs
+++ b/core/bindings.rs
@@ -206,7 +206,7 @@ pub extern "C" fn host_import_module_dynamically_callback(
if arg.is_native_error() {
let message = v8::Exception::create_message(scope, arg);
if message.get_stack_trace(scope).unwrap().get_frame_count() == 0 {
- let arg: v8::Local<v8::Object> = arg.clone().try_into().unwrap();
+ let arg: v8::Local<v8::Object> = arg.try_into().unwrap();
let message_key = v8::String::new(scope, "message").unwrap();
let message = arg.get(scope, message_key.into()).unwrap();
let exception =
diff --git a/core/error.rs b/core/error.rs
index 1d9df2641..abe707795 100644
--- a/core/error.rs
+++ b/core/error.rs
@@ -191,8 +191,7 @@ impl JsError {
let (message, frames, stack) = if exception.is_native_error() {
// The exception is a JS Error object.
- let exception: v8::Local<v8::Object> =
- exception.clone().try_into().unwrap();
+ let exception: v8::Local<v8::Object> = exception.try_into().unwrap();
let e: NativeJsError =
serde_v8::from_v8(scope, exception.into()).unwrap();