Skip to content

Commit 934d237

Browse files
committed
Ignore buggy clippy::needless_borrow lint
```text error: this expression borrows a value the compiler would automatically borrow --> futures-util/src/future/poll_fn.rs:56:9 | 56 | (&mut self.f)(cx) | ^^^^^^^^^^^^^ help: change this to: `self.f` | = note: `-D clippy::needless-borrow` implied by `-D warnings` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow error: this expression borrows a value the compiler would automatically borrow --> futures-util/src/stream/repeat_with.rs:23:26 | 23 | Poll::Ready(Some((&mut self.repeater)())) | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `self.repeater` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow error: this expression borrows a value the compiler would automatically borrow --> futures-util/src/stream/poll_fn.rs:55:9 | 55 | (&mut self.f)(cx) | ^^^^^^^^^^^^^ help: change this to: `self.f` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow ```
1 parent 79036ba commit 934d237

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

futures-util/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
))]
2020
#![cfg_attr(docsrs, feature(doc_cfg))]
2121
#![allow(clippy::non_send_fields_in_send_ty)]
22+
#![allow(clippy::needless_borrow)] // https://github.com/rust-lang/futures-rs/pull/2558#issuecomment-1030745203
2223

2324
#[cfg(all(feature = "bilock", not(feature = "unstable")))]
2425
compile_error!("The `bilock` feature requires the `unstable` feature as an explicit opt-in to unstable features");

futures/tests/ready_queue.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![allow(clippy::needless_borrow)] // https://github.com/rust-lang/rust-clippy/issues/8367
2+
13
use futures::channel::oneshot;
24
use futures::executor::{block_on, block_on_stream};
35
use futures::future;

0 commit comments

Comments
 (0)