1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-12 00:54:02 -05:00

chore: update inner #\![allow] to #[allow] (#20463)

Functions should generally be annotated with `#[allow]` blocks rather
than using inner `#![allow]` annotations.
This commit is contained in:
Matt Mastracci 2023-09-11 17:12:33 -06:00 committed by GitHub
parent bdeb4bddbf
commit bfd230fd78
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 4 deletions

View file

@ -27,12 +27,12 @@ use editor::ReplEditor;
use session::EvaluationOutput; use session::EvaluationOutput;
use session::ReplSession; use session::ReplSession;
#[allow(clippy::await_holding_refcell_ref)]
async fn read_line_and_poll( async fn read_line_and_poll(
repl_session: &mut ReplSession, repl_session: &mut ReplSession,
message_handler: &mut RustylineSyncMessageHandler, message_handler: &mut RustylineSyncMessageHandler,
editor: ReplEditor, editor: ReplEditor,
) -> Result<String, ReadlineError> { ) -> Result<String, ReadlineError> {
#![allow(clippy::await_holding_refcell_ref)]
let mut line_fut = spawn_blocking(move || editor.readline()); let mut line_fut = spawn_blocking(move || editor.readline());
let mut poll_worker = true; let mut poll_worker = true;
let notifications_rc = repl_session.notifications.clone(); let notifications_rc = repl_session.notifications.clone();

View file

@ -51,11 +51,11 @@ impl MessagePort {
Ok(()) Ok(())
} }
#[allow(clippy::await_holding_refcell_ref)] // TODO(ry) remove!
pub async fn recv( pub async fn recv(
&self, &self,
state: Rc<RefCell<OpState>>, state: Rc<RefCell<OpState>>,
) -> Result<Option<JsMessageData>, AnyError> { ) -> Result<Option<JsMessageData>, AnyError> {
#![allow(clippy::await_holding_refcell_ref)] // TODO(ry) remove!
let mut rx = self let mut rx = self
.rx .rx
.try_borrow_mut() .try_borrow_mut()

View file

@ -336,11 +336,11 @@ fn op_spawn_child(
// TODO(bartlomieju): op2 doesn't support clippy allows // TODO(bartlomieju): op2 doesn't support clippy allows
#[op] #[op]
#[allow(clippy::await_holding_refcell_ref)]
async fn op_spawn_wait( async fn op_spawn_wait(
state: Rc<RefCell<OpState>>, state: Rc<RefCell<OpState>>,
rid: ResourceId, rid: ResourceId,
) -> Result<ChildStatus, AnyError> { ) -> Result<ChildStatus, AnyError> {
#![allow(clippy::await_holding_refcell_ref)]
let resource = state let resource = state
.borrow_mut() .borrow_mut()
.resource_table .resource_table

View file

@ -236,10 +236,10 @@ pub struct WebWorkerHandle {
impl WebWorkerHandle { impl WebWorkerHandle {
/// Get the WorkerEvent with lock /// Get the WorkerEvent with lock
/// Return error if more than one listener tries to get event /// 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( pub async fn get_control_event(
&self, &self,
) -> Result<Option<WorkerControlEvent>, AnyError> { ) -> Result<Option<WorkerControlEvent>, AnyError> {
#![allow(clippy::await_holding_refcell_ref)] // TODO(ry) remove!
let mut receiver = self.receiver.borrow_mut(); let mut receiver = self.receiver.borrow_mut();
Ok(receiver.next().await) Ok(receiver.next().await)
} }