From 1ec7c26851ffb04f6d3dbfe70917866a05e55897 Mon Sep 17 00:00:00 2001 From: Wojciech Graj Date: Sun, 10 Nov 2024 22:38:14 +0100 Subject: [PATCH] Fix benchmark. --- bench/src/lib.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bench/src/lib.rs b/bench/src/lib.rs index 384d35f..a55aca5 100644 --- a/bench/src/lib.rs +++ b/bench/src/lib.rs @@ -10,9 +10,9 @@ mod vec { #[derive(Debug, ProtocolRead, ProtocolWrite, PartialEq)] struct V { - #[protocol(write_value = "self.data.len() as u8")] + #[protocol(write_value = self.data.len() as u8)] count: u8, - #[protocol(tag = "count as usize")] + #[protocol(tag = count as usize)] data: Vec, } @@ -85,7 +85,7 @@ mod enum_ { use bin_proto::{ProtocolNoCtx, ProtocolRead, ProtocolWrite}; #[derive(Debug, ProtocolRead, ProtocolWrite, PartialEq)] - #[protocol(discriminant_type = "u8")] + #[protocol(discriminant_type = u8)] enum E { V0 = 0, V1 = 1, @@ -164,7 +164,7 @@ mod ipv4 { use bin_proto::{ProtocolNoCtx, ProtocolRead, ProtocolWrite}; #[derive(Debug, ProtocolRead, ProtocolWrite, PartialEq)] - #[protocol(discriminant_type = "u8")] + #[protocol(discriminant_type = u8)] #[protocol(bits = 4)] enum Version { V4 = 4,