codec/packet: use size to know if a packet is empty

This commit is contained in:
meh 2015-10-07 16:20:46 +02:00
parent 132c514e3f
commit 7e2ebcf36b

View File

@ -30,7 +30,7 @@ impl Packet {
#[inline(always)] #[inline(always)]
pub unsafe fn is_empty(&self) -> bool { pub unsafe fn is_empty(&self) -> bool {
self.0.buf.is_null() self.0.size == 0
} }
} }