1
0

remove len_without_addr()

This commit is contained in:
EAimTY 2023-05-30 20:46:06 +09:00
parent 4513bc7955
commit 9fe6d8018a

View File

@ -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()
}
}