diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/async_cell.rs | 12 | ||||
-rw-r--r-- | core/error.rs | 2 | ||||
-rw-r--r-- | core/examples/http_bench_json_ops.rs | 2 | ||||
-rw-r--r-- | core/runtime.rs | 4 |
4 files changed, 10 insertions, 10 deletions
diff --git a/core/async_cell.rs b/core/async_cell.rs index ea6cac831..e643af782 100644 --- a/core/async_cell.rs +++ b/core/async_cell.rs @@ -220,13 +220,13 @@ impl<T> Deref for RcRef<T> { impl<T> Borrow<T> for RcRef<T> { fn borrow(&self) -> &T { - &**self + self } } impl<T> AsRef<T> for RcRef<T> { fn as_ref(&self) -> &T { - &**self + self } } @@ -478,13 +478,13 @@ mod internal { impl<T, M: BorrowModeTrait> Borrow<T> for AsyncBorrowImpl<T, M> { fn borrow(&self) -> &T { - &**self + self } } impl<T, M: BorrowModeTrait> AsRef<T> for AsyncBorrowImpl<T, M> { fn as_ref(&self) -> &T { - &**self + self } } @@ -500,13 +500,13 @@ mod internal { impl<T> BorrowMut<T> for AsyncBorrowImpl<T, Exclusive> { fn borrow_mut(&mut self) -> &mut T { - &mut **self + self } } impl<T> AsMut<T> for AsyncBorrowImpl<T, Exclusive> { fn as_mut(&mut self) -> &mut T { - &mut **self + self } } diff --git a/core/error.rs b/core/error.rs index 9ad99c6da..d71da3164 100644 --- a/core/error.rs +++ b/core/error.rs @@ -242,7 +242,7 @@ impl JsError { serde_v8::from_v8(scope, exception.into()).unwrap_or_default(); // Get the message by formatting error.name and error.message. let name = e.name.clone().unwrap_or_else(|| "Error".to_string()); - let message_prop = e.message.clone().unwrap_or_else(|| "".to_string()); + let message_prop = e.message.clone().unwrap_or_default(); let exception_message = exception_message.unwrap_or_else(|| { if !name.is_empty() && !message_prop.is_empty() { format!("Uncaught {}: {}", name, message_prop) diff --git a/core/examples/http_bench_json_ops.rs b/core/examples/http_bench_json_ops.rs index 6eaa99a38..af57f3121 100644 --- a/core/examples/http_bench_json_ops.rs +++ b/core/examples/http_bench_json_ops.rs @@ -131,7 +131,7 @@ fn create_js_runtime() -> JsRuntime { fn op_listen(state: &mut OpState) -> Result<ResourceId, Error> { log::debug!("listen"); let addr = "127.0.0.1:4570".parse::<SocketAddr>().unwrap(); - let std_listener = std::net::TcpListener::bind(&addr)?; + let std_listener = std::net::TcpListener::bind(addr)?; std_listener.set_nonblocking(true)?; let listener = TcpListener::try_from(std_listener)?; let rid = state.resource_table.add(listener); diff --git a/core/runtime.rs b/core/runtime.rs index e85b7296a..b1ce14883 100644 --- a/core/runtime.rs +++ b/core/runtime.rs @@ -2888,7 +2888,7 @@ pub mod tests { ..Default::default() }); runtime.execute_script("a.js", "a = 1 + 2").unwrap(); - let snap: &[u8] = &*runtime.snapshot(); + let snap: &[u8] = &runtime.snapshot(); Vec::from(snap).into_boxed_slice() }; @@ -4051,7 +4051,7 @@ Deno.core.ops.op_async_serialize_object_with_numbers_as_keys({ will_snapshot: true, ..Default::default() }); - let snap: &[u8] = &*runtime.snapshot(); + let snap: &[u8] = &runtime.snapshot(); Vec::from(snap).into_boxed_slice() }; |