diff options
author | Matt Mastracci <matthew@mastracci.com> | 2023-09-11 17:12:33 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-11 17:12:33 -0600 |
commit | bfd230fd78ef7867eec75e6b21715f51e72e7a23 (patch) | |
tree | 82e608291c571f2ea6a2448ba935f35d7ce0c0f0 | |
parent | bdeb4bddbf5cabd04abe906388f5ebfe64a84c53 (diff) |
chore: update inner #\![allow] to #[allow] (#20463)
Functions should generally be annotated with `#[allow]` blocks rather
than using inner `#![allow]` annotations.
-rw-r--r-- | cli/tools/repl/mod.rs | 2 | ||||
-rw-r--r-- | ext/web/message_port.rs | 2 | ||||
-rw-r--r-- | runtime/ops/process.rs | 2 | ||||
-rw-r--r-- | runtime/web_worker.rs | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/cli/tools/repl/mod.rs b/cli/tools/repl/mod.rs index 05c822e11..fb0891fa6 100644 --- a/cli/tools/repl/mod.rs +++ b/cli/tools/repl/mod.rs @@ -27,12 +27,12 @@ use editor::ReplEditor; use session::EvaluationOutput; use session::ReplSession; +#[allow(clippy::await_holding_refcell_ref)] async fn read_line_and_poll( repl_session: &mut ReplSession, message_handler: &mut RustylineSyncMessageHandler, editor: ReplEditor, ) -> Result<String, ReadlineError> { - #![allow(clippy::await_holding_refcell_ref)] let mut line_fut = spawn_blocking(move || editor.readline()); let mut poll_worker = true; let notifications_rc = repl_session.notifications.clone(); diff --git a/ext/web/message_port.rs b/ext/web/message_port.rs index 47ebdabf7..73214ab8e 100644 --- a/ext/web/message_port.rs +++ b/ext/web/message_port.rs @@ -51,11 +51,11 @@ impl MessagePort { Ok(()) } + #[allow(clippy::await_holding_refcell_ref)] // TODO(ry) remove! pub async fn recv( &self, state: Rc<RefCell<OpState>>, ) -> Result<Option<JsMessageData>, AnyError> { - #![allow(clippy::await_holding_refcell_ref)] // TODO(ry) remove! let mut rx = self .rx .try_borrow_mut() diff --git a/runtime/ops/process.rs b/runtime/ops/process.rs index acfd0dc5c..cef4f77f8 100644 --- a/runtime/ops/process.rs +++ b/runtime/ops/process.rs @@ -336,11 +336,11 @@ fn op_spawn_child( // TODO(bartlomieju): op2 doesn't support clippy allows #[op] +#[allow(clippy::await_holding_refcell_ref)] async fn op_spawn_wait( state: Rc<RefCell<OpState>>, rid: ResourceId, ) -> Result<ChildStatus, AnyError> { - #![allow(clippy::await_holding_refcell_ref)] let resource = state .borrow_mut() .resource_table diff --git a/runtime/web_worker.rs b/runtime/web_worker.rs index 17bbb41ea..6fcc7aa9c 100644 --- a/runtime/web_worker.rs +++ b/runtime/web_worker.rs @@ -236,10 +236,10 @@ pub struct WebWorkerHandle { impl WebWorkerHandle { /// Get the WorkerEvent with lock /// Return error if more than one listener tries to get event + #[allow(clippy::await_holding_refcell_ref)] // TODO(ry) remove! pub async fn get_control_event( &self, ) -> Result<Option<WorkerControlEvent>, AnyError> { - #![allow(clippy::await_holding_refcell_ref)] // TODO(ry) remove! let mut receiver = self.receiver.borrow_mut(); Ok(receiver.next().await) } |