Skip to content

Commit

Permalink
Fix Clippy warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomasdezeeuw committed Nov 13, 2021
1 parent a8c5756 commit 41a494b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/poll.rs
Original file line number Diff line number Diff line change
Expand Up @@ -647,9 +647,10 @@ impl Registry {
/// instance.
#[cfg(debug_assertions)]
pub(crate) fn register_waker(&self) {
if self.selector.register_waker() {
panic!("Only a single `Waker` can be active per `Poll` instance");
}
assert!(
!self.selector.register_waker(),
"Only a single `Waker` can be active per `Poll` instance"
);
}

/// Get access to the `sys::Selector`.
Expand Down

0 comments on commit 41a494b

Please sign in to comment.