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
|
/// Returns the serialized length of the command
|
||||||
#[allow(clippy::len_without_is_empty)]
|
#[allow(clippy::len_without_is_empty)]
|
||||||
pub fn len(&self) -> usize {
|
pub fn len(&self) -> usize {
|
||||||
Self::len_without_addr() + self.addr.len()
|
2 + 2 + 1 + 1 + 2 + 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
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user