refactor: clippy fixs

This commit is contained in:
Cain 2024-01-18 18:59:19 +00:00
parent bedd277027
commit b1e42f9023
4 changed files with 13 additions and 13 deletions

View file

@ -56,7 +56,7 @@ impl<W: Write> Pcap<W> {
let (source_port, dest_port) = info.ports_by_direction();
match info.protocol {
Protocol::TCP => {
Protocol::Tcp => {
let buf_size = {
let mut tcp = MutableTcpPacket::new(&mut buf).unwrap();
tcp.set_source(source_port);
@ -123,7 +123,7 @@ impl<W: Write> Pcap<W> {
vec![EnhancedPacketOption::Comment("Generated TCP ACK".into())],
);
}
Protocol::UDP => {
Protocol::Udp => {
let buf_size = {
let mut udp = MutableUdpPacket::new(&mut buf).unwrap();
udp.set_source(source_port);