diff options
| author | Max Audron <audron@cocaine.farm> | 2025-02-26 17:20:15 +0100 |
|---|---|---|
| committer | Max Audron <audron@cocaine.farm> | 2025-02-26 17:20:15 +0100 |
| commit | bb861cb828dedaae880d1f0cea759d79020f6c90 (patch) | |
| tree | 0ac14b0a4ac2c4d0798621f7182fec5d435c1be0 /src/primitive/variant.rs | |
| parent | enable transparent repr for msgid and bufferid (diff) | |
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
Diffstat (limited to 'src/primitive/variant.rs')
| -rw-r--r-- | src/primitive/variant.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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))), |
