Skip to content

Commit

Permalink
silence dead_code and type_complexity warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
mycognosist committed Jun 26, 2024
1 parent 7965bd5 commit 4eca3c8
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/local_nb/consumer/invariant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ impl<C> Invariant<C> {
/// `inner`, except that - when running tests - it performs runtime
/// validation of API invariants and panics if they are violated by a
/// caller.
#[allow(dead_code)]
pub fn new(inner: C) -> Self {
Invariant {
inner,
Expand Down
1 change: 1 addition & 0 deletions src/local_nb/consumer/invariant_noop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ pub struct Invariant<C> {
impl<C> Invariant<C> {
/// Return a `Consumer` that behaves exactly like the wrapped `Consumer`
/// `inner`.
#[allow(dead_code)]
pub fn new(inner: C) -> Self {
Invariant { inner }
}
Expand Down
1 change: 1 addition & 0 deletions src/local_nb/producer/invariant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ impl<P> Invariant<P> {
/// `inner`, except that - when running tests - it performs runtime
/// validation of API invariants and panics if they are violated by a
/// caller.
#[allow(dead_code)]
pub fn new(inner: P) -> Self {
Invariant {
inner,
Expand Down
1 change: 1 addition & 0 deletions src/local_nb/producer/invariant_noop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ pub struct Invariant<P> {
impl<P> Invariant<P> {
/// Return a `Producer` that behaves exactly like the wrapped `Producer`
/// `inner`.
#[allow(dead_code)]
pub fn new(inner: P) -> Self {
Invariant { inner }
}
Expand Down
1 change: 1 addition & 0 deletions src/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ where
/// #### Invariants
///
/// Must not be called after any function of this trait has returned a final item or an error.
#[allow(clippy::type_complexity)]
fn producer_slots(&mut self) -> Result<Either<&[Self::Item], Self::Final>, Self::Error>;

/// Mark `amount` many items as having been produced. Future calls to `produce` and to
Expand Down
1 change: 1 addition & 0 deletions src/sync/consumer/invariant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ impl<C> Invariant<C> {
/// `inner`, except that - when running tests - it performs runtime
/// validation of API invariants and panics if they are violated by a
/// caller.
#[allow(dead_code)]
pub fn new(inner: C) -> Self {
Invariant {
inner,
Expand Down
1 change: 1 addition & 0 deletions src/sync/consumer/invariant_noop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ pub struct Invariant<C> {
impl<C> Invariant<C> {
/// Return a `Consumer` that behaves exactly like the wrapped `Consumer`
/// `inner`.
#[allow(dead_code)]
pub fn new(inner: C) -> Self {
Invariant { inner }
}
Expand Down
1 change: 1 addition & 0 deletions src/sync/producer/invariant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ impl<P> Invariant<P> {
/// `inner`, except that - when running tests - it performs runtime
/// validation of API invariants and panics if they are violated by a
/// caller.
#[allow(dead_code)]
pub fn new(inner: P) -> Self {
Invariant {
inner,
Expand Down
1 change: 1 addition & 0 deletions src/sync/producer/invariant_noop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ pub struct Invariant<P> {
impl<P> Invariant<P> {
/// Return a `Producer` that behaves exactly like the wrapped `Producer`
/// `inner`.
#[allow(dead_code)]
pub fn new(inner: P) -> Self {
Invariant { inner }
}
Expand Down

0 comments on commit 4eca3c8

Please sign in to comment.