codec/packet: use size to know if a packet is empty
This commit is contained in:
parent
132c514e3f
commit
7e2ebcf36b
@ -30,7 +30,7 @@ impl Packet {
|
||||
|
||||
#[inline(always)]
|
||||
pub unsafe fn is_empty(&self) -> bool {
|
||||
self.0.buf.is_null()
|
||||
self.0.size == 0
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user