From bb861cb828dedaae880d1f0cea759d79020f6c90 Mon Sep 17 00:00:00 2001 From: Max Audron Date: Wed, 26 Feb 2025 17:20:15 +0100 Subject: add MsgId and BufferId to objects where needed some objects where still handling BufferId or MsgId as their raw types which lead to errors now that the Types are properly parsed in the varinats --- src/primitive/variant.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/primitive/variant.rs') diff --git a/src/primitive/variant.rs b/src/primitive/variant.rs index 340d908..a7ff8ca 100644 --- a/src/primitive/variant.rs +++ b/src/primitive/variant.rs @@ -288,7 +288,7 @@ impl Serialize for Variant { impl Deserialize for Variant { fn parse(b: &[u8]) -> Result<(usize, Self), ProtocolError> { - trace!("trying to parse variant with bytes: {:?}", b); + trace!("trying to parse variant with bytes: {:x?}", b); let (_, qtype) = i32::parse(&b[0..4])?; let qtype = qtype as u32; @@ -805,7 +805,7 @@ mod tests { #[test] fn bufferid_deserialize() { let test_bytes = vec![ - 0, 0, 0, 127, 0, 0, 0, 0, 8, 66, 117, 102, 102, 101, 114, 73, 100, 0, 0, 0, 1 + 0, 0, 0, 127, 0, 0, 0, 0, 8, 66, 117, 102, 102, 101, 114, 73, 100, 0, 0, 0, 1, ]; assert_eq!( (test_bytes.len(), Variant::BufferId(BufferId(1))), -- cgit v1.2.3