From 369e1879ea08e69ad4d8cbd976b1113629add7fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20M=C3=BCller?= Date: Thu, 9 Nov 2023 08:14:27 -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}"), } }