Skip to content

Commit

Permalink
fix: clippy lint
Browse files Browse the repository at this point in the history
  • Loading branch information
swanandx committed Nov 15, 2024
1 parent d67e919 commit 8be8afe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rumqttc/src/tokens.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ impl<T> Token<T> {
self.rx
.blocking_recv()
.map_err(|_| TokenError::Disconnected)?
.map_err(|e| TokenError::Rejection(e))
.map_err(TokenError::Rejection)
}

/// Attempts to check if the packet handling has been completed, without blocking the current thread.
Expand All @@ -78,7 +78,7 @@ impl<T> Token<T> {
/// if the promise has already been resolved.
pub fn check(&mut self) -> Result<T, TokenError> {
match self.rx.try_recv() {
Ok(r) => r.map_err(|e| TokenError::Rejection(e)),
Ok(r) => r.map_err(TokenError::Rejection),
Err(TryRecvError::Empty) => Err(TokenError::Waiting),
Err(TryRecvError::Closed) => Err(TokenError::Disconnected),
}
Expand Down

0 comments on commit 8be8afe

Please sign in to comment.