Skip to content

Commit 3e66ba7

Browse files
committed
Remove ignored #[must_use] attributes from Clippy
The `#[must_use]` attribute has no effect when applied to methods in trait implementations.
1 parent f3515fb commit 3e66ba7

File tree

2 files changed

+0
-4
lines changed

2 files changed

+0
-4
lines changed

Diff for: src/tools/clippy/clippy_lints/src/infinite_iter.rs

-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ impl Finiteness {
9494
}
9595

9696
impl From<bool> for Finiteness {
97-
#[must_use]
9897
fn from(b: bool) -> Self {
9998
if b { Infinite } else { Finite }
10099
}

Diff for: src/tools/clippy/clippy_utils/src/consts.rs

-3
Original file line numberDiff line numberDiff line change
@@ -351,21 +351,18 @@ pub enum FullInt {
351351
}
352352

353353
impl PartialEq for FullInt {
354-
#[must_use]
355354
fn eq(&self, other: &Self) -> bool {
356355
self.cmp(other) == Ordering::Equal
357356
}
358357
}
359358

360359
impl PartialOrd for FullInt {
361-
#[must_use]
362360
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
363361
Some(self.cmp(other))
364362
}
365363
}
366364

367365
impl Ord for FullInt {
368-
#[must_use]
369366
fn cmp(&self, other: &Self) -> Ordering {
370367
use FullInt::{S, U};
371368

0 commit comments

Comments
 (0)