From 9fe6d8018a494d76227b5bf30660dcf149b52cb6 Mon Sep 17 00:00:00 2001 From: EAimTY Date: Tue, 30 May 2023 20:46:06 +0900 Subject: [PATCH] remove `len_without_addr()` --- tuic/src/protocol/packet.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/tuic/src/protocol/packet.rs b/tuic/src/protocol/packet.rs index 95f5767..74e4beb 100644 --- a/tuic/src/protocol/packet.rs +++ b/tuic/src/protocol/packet.rs @@ -87,12 +87,7 @@ impl Packet { /// Returns the serialized length of the command #[allow(clippy::len_without_is_empty)] pub fn len(&self) -> usize { - Self::len_without_addr() + self.addr.len() - } - - /// Returns the serialized length of the command without the address - pub const fn len_without_addr() -> usize { - 2 + 2 + 1 + 1 + 2 + 2 + 2 + 1 + 1 + 2 + self.addr.len() } }