From 8031644e65647bdc3a6a0561ad31da9228e9723d Mon Sep 17 00:00:00 2001 From: Yusuke Tanaka Date: Fri, 18 Jun 2021 04:56:30 +0900 Subject: chore: upgrade Rust to 1.53.0 (#11021) --- core/async_cancel.rs | 4 ++-- core/bindings.rs | 2 +- core/error.rs | 3 +-- 3 files changed, 4 insertions(+), 5 deletions(-) (limited to 'core') 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 = arg.clone().try_into().unwrap(); + let arg: v8::Local = 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 = - exception.clone().try_into().unwrap(); + let exception: v8::Local = exception.try_into().unwrap(); let e: NativeJsError = serde_v8::from_v8(scope, exception.into()).unwrap(); -- cgit v1.2.3