summaryrefslogtreecommitdiffhomepage
path: root/oxish-proto/tests
diff options
context:
space:
mode:
Diffstat (limited to 'oxish-proto/tests')
-rw-r--r--oxish-proto/tests/decode.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/oxish-proto/tests/decode.rs b/oxish-proto/tests/decode.rs
index 99cbe2e..8aecfd2 100644
--- a/oxish-proto/tests/decode.rs
+++ b/oxish-proto/tests/decode.rs
@@ -4,10 +4,10 @@ use oxish_proto::{Completion, IncomingPacket, ProtoError, ReadState};
fn padding_too_large() {
const PACKET: &[u8] = include_bytes!("padding-too-large.bin");
let mut state = ReadState::default();
- assert_eq!(
+ assert!(matches!(
decode(PACKET, &mut state).unwrap_err(),
- ProtoError::InvalidPacket("padding length exceeds packet length")
- );
+ ProtoError::InvalidPacket("padding length exceeds packet length"),
+ ));
}
fn decode<'a>(bytes: &[u8], state: &'a mut ReadState) -> Result<IncomingPacket<'a>, ProtoError> {