Skip to content

Commit 6edf1a7

Browse files
committed
Fix clippy::return_self_not_must_use warning
```text error: missing `#[must_use]` attribute on a method returning `Self` --> futures-util/src/stream/select_with_strategy.rs:19:5 | 19 | / pub fn toggle(&mut self) -> Self { 20 | | let old = *self; 21 | | 22 | | match self { ... | 27 | | old 28 | | } | |_____^ | ```
1 parent cb3c515 commit 6edf1a7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

futures-util/src/stream/select_with_strategy.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ pub enum PollNext {
1616

1717
impl PollNext {
1818
/// Toggle the value and return the old one.
19+
#[must_use]
1920
pub fn toggle(&mut self) -> Self {
2021
let old = *self;
2122

0 commit comments

Comments
 (0)