From fcf858f6ed6aab4c0d9056a676845d3d1ddf81b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20M=C3=BCller?= Date: Fri, 15 Dec 2023 07:53:11 -0800 Subject: [PATCH] Address clippy reported issues A recent version of clippy complains about a redundant guard in two of our tests. Fix these occurrences as per its suggestion. --- src/api/v2/updates.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/api/v2/updates.rs b/src/api/v2/updates.rs index c81ecfa..efac5b4 100644 --- a/src/api/v2/updates.rs +++ b/src/api/v2/updates.rs @@ -568,8 +568,9 @@ mod tests { let result = mock_stream::(test).await; match result { Ok(..) => panic!("authentication succeeded unexpectedly"), - Err(Error::WebSocket(WebSocketError::Protocol(e))) - if e == ProtocolError::ResetWithoutClosingHandshake => {}, + Err(Error::WebSocket(WebSocketError::Protocol( + ProtocolError::ResetWithoutClosingHandshake, + ))) => {}, Err(e) => panic!("received unexpected error: {e}"), } } @@ -627,8 +628,7 @@ mod tests { let err = mock_stream::(test).await.unwrap_err(); match err { - Error::WebSocket(WebSocketError::Protocol(e)) - if e == ProtocolError::ResetWithoutClosingHandshake => {}, + Error::WebSocket(WebSocketError::Protocol(ProtocolError::ResetWithoutClosingHandshake)) => {}, e => panic!("received unexpected error: {e}"), } }