Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
westy92 committed Jan 26, 2024
1 parent 73d6216 commit a5b30ac
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/once.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,14 @@ impl OnceState {
/// indicate to future forced initialization routines that it is poisoned.
#[inline]
pub fn poisoned(self) -> bool {
match self {
OnceState::Poisoned => true,
_ => false,
}
matches!(self, OnceState::Poisoned)
}

/// Returns whether the associated `Once` has successfully executed a
/// closure.
#[inline]
pub fn done(self) -> bool {
match self {
OnceState::Done => true,
_ => false,
}
matches!(self, OnceState::Done)
}
}

Expand Down

0 comments on commit a5b30ac

Please sign in to comment.