diff options
-rw-r--r-- | src/main.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/main.rs b/src/main.rs index 40ca33b..f06948c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -57,16 +57,14 @@ impl PacketCodec for NullCodec { type Item = PcapPacket<'static>; fn decode(&mut self, packet: Packet<'_>) -> Self::Item { - let pcap_packet = PcapPacket::new_owned( + PcapPacket::new_owned( Duration::new( packet.header.ts.tv_sec as u64, (packet.header.ts.tv_usec * 1000) as u32, ), packet.header.len, packet.data.to_vec(), - ); - - pcap_packet + ) } } |