Skip to content

Commit

Permalink
Merge #652
Browse files Browse the repository at this point in the history
652: Ignore clippy::unnecessary_wraps lint r=taiki-e a=taiki-e



Co-authored-by: Taiki Endo <te316e89@gmail.com>
  • Loading branch information
bors[bot] and taiki-e committed Feb 13, 2021
2 parents 958baa3 + 0b9012b commit f1fb602
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions crossbeam-channel/src/flavors/array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,7 @@ impl<T> Channel<T> {
}

/// Returns the capacity of the channel.
#[allow(clippy::unnecessary_wraps)] // This is intentional.
pub(crate) fn capacity(&self) -> Option<usize> {
Some(self.cap)
}
Expand Down
1 change: 1 addition & 0 deletions crossbeam-channel/src/flavors/at.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ impl Channel {
}

/// Returns the capacity of the channel.
#[allow(clippy::unnecessary_wraps)] // This is intentional.
#[inline]
pub(crate) fn capacity(&self) -> Option<usize> {
Some(1)
Expand Down
1 change: 1 addition & 0 deletions crossbeam-channel/src/flavors/never.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ impl<T> Channel<T> {
}

/// Returns the capacity of the channel.
#[allow(clippy::unnecessary_wraps)] // This is intentional.
#[inline]
pub(crate) fn capacity(&self) -> Option<usize> {
Some(0)
Expand Down
1 change: 1 addition & 0 deletions crossbeam-channel/src/flavors/tick.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ impl Channel {
}

/// Returns the capacity of the channel.
#[allow(clippy::unnecessary_wraps)] // This is intentional.
#[inline]
pub(crate) fn capacity(&self) -> Option<usize> {
Some(1)
Expand Down
1 change: 1 addition & 0 deletions crossbeam-channel/src/flavors/zero.rs
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,7 @@ impl<T> Channel<T> {
}

/// Returns the capacity of the channel.
#[allow(clippy::unnecessary_wraps)] // This is intentional.
pub(crate) fn capacity(&self) -> Option<usize> {
Some(0)
}
Expand Down
1 change: 1 addition & 0 deletions crossbeam-utils/src/atomic/atomic_cell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -778,6 +778,7 @@ impl AtomicUnit {
#[inline]
fn swap(&self, _val: (), _order: Ordering) {}

#[allow(clippy::unnecessary_wraps)] // This is intentional.
#[inline]
fn compare_exchange_weak(
&self,
Expand Down

0 comments on commit f1fb602

Please sign in to comment.