mirror of
https://github.com/denoland/deno.git
synced 2025-03-03 09:31:22 -05:00
Remove various unnecessary allow(clippy) declarations (#10971)
This commit is contained in:
parent
b6fd39377e
commit
9c42b5e03b
9 changed files with 4 additions and 20 deletions
|
@ -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 {
|
||||
|
|
|
@ -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<bool, AnyError> {
|
||||
state.response = Some(args);
|
||||
Ok(true)
|
||||
}
|
||||
|
||||
#[allow(clippy::unnecessary_wraps)]
|
||||
fn op_script_names(
|
||||
state: &mut State,
|
||||
_args: Value,
|
||||
|
|
|
@ -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<TP>(
|
||||
state: &mut OpState,
|
||||
_argument: (),
|
||||
|
@ -176,7 +173,6 @@ where
|
|||
Ok(result)
|
||||
}
|
||||
|
||||
#[allow(clippy::unnecessary_wraps)]
|
||||
pub fn op_sleep_sync<TP>(
|
||||
state: &mut OpState,
|
||||
millis: u64,
|
||||
|
|
|
@ -25,7 +25,6 @@ struct MetricsReturn {
|
|||
ops: Value,
|
||||
}
|
||||
|
||||
#[allow(clippy::unnecessary_wraps)]
|
||||
fn op_metrics(
|
||||
state: &mut OpState,
|
||||
_args: (),
|
||||
|
|
|
@ -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<u32>,
|
||||
|
|
|
@ -56,7 +56,6 @@ impl Resource for SignalStreamResource {
|
|||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
#[allow(clippy::unnecessary_wraps)]
|
||||
fn op_signal_bind(
|
||||
state: &mut OpState,
|
||||
signo: i32,
|
||||
|
|
|
@ -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::<WebWorkerInternalHandle>().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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -86,7 +86,6 @@ impl Resource for TestResource {
|
|||
}
|
||||
}
|
||||
|
||||
#[allow(clippy::unnecessary_wraps)]
|
||||
fn op_test_resource_table_add(
|
||||
state: &mut OpState,
|
||||
text: String,
|
||||
|
|
Loading…
Add table
Reference in a new issue