Dario Nieuwenhuis 3 gadi atpakaļ
vecāks
revīzija
21e3dad2b2
2 mainītis faili ar 3 papildinājumiem un 5 dzēšanām
  1. 2 2
      src/iface/interface.rs
  2. 1 3
      src/socket/dhcpv4.rs

+ 2 - 2
src/iface/interface.rs

@@ -3582,12 +3582,12 @@ mod test {
     #[cfg(feature = "proto-igmp")]
     fn test_handle_igmp() {
         fn recv_igmp(
-            mut iface: &mut Interface<'_, Loopback>,
+            iface: &mut Interface<'_, Loopback>,
             timestamp: Instant,
         ) -> Vec<(Ipv4Repr, IgmpRepr)> {
             let caps = iface.device.capabilities();
             let checksum_caps = &caps.checksum;
-            recv_all(&mut iface, timestamp)
+            recv_all(iface, timestamp)
                 .iter()
                 .filter_map(|frame| {
                     let ipv4_packet = match caps.medium {

+ 1 - 3
src/socket/dhcpv4.rs

@@ -626,9 +626,7 @@ mod test {
             });
         }
 
-        if i != reprs.len() {
-            panic!("Too few reprs emitted. Wanted {}, got {}", reprs.len(), i);
-        }
+        assert_eq!(i, reprs.len());
     }
 
     macro_rules! send {