diff --git a/cli/lsp/config.rs b/cli/lsp/config.rs index 554bfd1e9f..ca2a535ef2 100644 --- a/cli/lsp/config.rs +++ b/cli/lsp/config.rs @@ -365,17 +365,15 @@ impl Config { value } - #[allow(clippy::redundant_closure_call)] pub fn update_capabilities( &mut self, capabilities: &lsp::ClientCapabilities, ) { if let Some(experimental) = &capabilities.experimental { - let get_bool = - |k: &str| experimental.get(k).and_then(|it| it.as_bool()) == Some(true); - - self.client_capabilities.status_notification = - get_bool("statusNotification"); + self.client_capabilities.status_notification = experimental + .get("statusNotification") + .and_then(|it| it.as_bool()) + == Some(true) } if let Some(workspace) = &capabilities.workspace { diff --git a/cli/lsp/tsc.rs b/cli/lsp/tsc.rs index 834ac0a0c2..d1690b252a 100644 --- a/cli/lsp/tsc.rs +++ b/cli/lsp/tsc.rs @@ -1868,7 +1868,6 @@ struct SourceSnapshotArgs { /// The language service is dropping a reference to a source file snapshot, and /// we can drop our version of that document. -#[allow(clippy::unnecessary_wraps)] fn op_dispose( state: &mut State, args: SourceSnapshotArgs, @@ -2091,13 +2090,11 @@ fn op_resolve( Ok(resolved) } -#[allow(clippy::unnecessary_wraps)] fn op_respond(state: &mut State, args: Response) -> Result { state.response = Some(args); Ok(true) } -#[allow(clippy::unnecessary_wraps)] fn op_script_names( state: &mut State, _args: Value, diff --git a/extensions/timers/lib.rs b/extensions/timers/lib.rs index 66e7d05eda..43a40e939a 100644 --- a/extensions/timers/lib.rs +++ b/extensions/timers/lib.rs @@ -100,7 +100,6 @@ impl GlobalTimer { } } -#[allow(clippy::unnecessary_wraps)] pub fn op_global_timer_stop( state: &mut OpState, _args: (), @@ -118,7 +117,6 @@ pub fn op_global_timer_stop( // // See https://github.com/denoland/deno/issues/7599 for more // details. -#[allow(clippy::unnecessary_wraps)] pub fn op_global_timer_start( state: &mut OpState, timeout: u64, @@ -150,7 +148,6 @@ pub async fn op_global_timer( // since the start time of the deno runtime. // If the High precision flag is not set, the // nanoseconds are rounded on 2ms. -#[allow(clippy::unnecessary_wraps)] pub fn op_now( state: &mut OpState, _argument: (), @@ -176,7 +173,6 @@ where Ok(result) } -#[allow(clippy::unnecessary_wraps)] pub fn op_sleep_sync( state: &mut OpState, millis: u64, diff --git a/runtime/metrics.rs b/runtime/metrics.rs index aabe953d0a..22b037a1ef 100644 --- a/runtime/metrics.rs +++ b/runtime/metrics.rs @@ -25,7 +25,6 @@ struct MetricsReturn { ops: Value, } -#[allow(clippy::unnecessary_wraps)] fn op_metrics( state: &mut OpState, _args: (), diff --git a/runtime/ops/fs.rs b/runtime/ops/fs.rs index a80eeb3ac3..cd93d05176 100644 --- a/runtime/ops/fs.rs +++ b/runtime/ops/fs.rs @@ -350,7 +350,6 @@ async fn op_fstat_async( Ok(get_stat(metadata)) } -#[allow(clippy::unnecessary_wraps)] fn op_umask( state: &mut OpState, mask: Option, diff --git a/runtime/ops/signal.rs b/runtime/ops/signal.rs index 2a72625d93..b3dfb5aab3 100644 --- a/runtime/ops/signal.rs +++ b/runtime/ops/signal.rs @@ -56,7 +56,6 @@ impl Resource for SignalStreamResource { } #[cfg(unix)] -#[allow(clippy::unnecessary_wraps)] fn op_signal_bind( state: &mut OpState, signo: i32, diff --git a/runtime/ops/web_worker.rs b/runtime/ops/web_worker.rs index e3ede869da..39aa2c0a90 100644 --- a/runtime/ops/web_worker.rs +++ b/runtime/ops/web_worker.rs @@ -57,7 +57,6 @@ async fn op_worker_get_message( Ok(maybe_data.unwrap_or_else(ZeroCopyBuf::empty)) } -#[allow(clippy::unnecessary_wraps)] fn op_worker_close(state: &mut OpState, _: (), _: ()) -> Result<(), AnyError> { // Notify parent that we're finished let mut handle = state.borrow_mut::().clone(); @@ -71,7 +70,6 @@ fn op_worker_close(state: &mut OpState, _: (), _: ()) -> Result<(), AnyError> { /// this same op to pass the error to its own parent (in case /// `e.preventDefault()` was not called in `worker.onerror`). This /// is done until the error reaches the root/ main worker. -#[allow(clippy::unnecessary_wraps)] fn op_worker_unhandled_error( state: &mut OpState, message: String, diff --git a/runtime/ops/worker_host.rs b/runtime/ops/worker_host.rs index a5698fa6e7..57d3ac2b8f 100644 --- a/runtime/ops/worker_host.rs +++ b/runtime/ops/worker_host.rs @@ -509,7 +509,6 @@ fn op_create_worker( Ok(worker_id) } -#[allow(clippy::unnecessary_wraps)] fn op_host_terminate_worker( state: &mut OpState, id: WorkerId, diff --git a/test_plugin/src/lib.rs b/test_plugin/src/lib.rs index 0626ef3c3b..88761edcf1 100644 --- a/test_plugin/src/lib.rs +++ b/test_plugin/src/lib.rs @@ -86,7 +86,6 @@ impl Resource for TestResource { } } -#[allow(clippy::unnecessary_wraps)] fn op_test_resource_table_add( state: &mut OpState, text: String,