remove len_without_addr()
This commit is contained in:
parent
4513bc7955
commit
9fe6d8018a
@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user