Browse Source

Fix an unimplemented!() invocation that should be unreachable!().

whitequark 7 years ago
parent
commit
6cf248e752
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/iface/ethernet.rs

+ 2 - 1
src/iface/ethernet.rs

@@ -404,7 +404,8 @@ impl<'a, 'b, 'c, DeviceT: Device + 'a> Interface<'a, 'b, 'c, DeviceT> {
                             match (repr.src_addr(), repr.dst_addr()) {
                             match (repr.src_addr(), repr.dst_addr()) {
                                 (IpAddress::Ipv4(src_addr), IpAddress::Ipv4(dst_addr)) =>
                                 (IpAddress::Ipv4(src_addr), IpAddress::Ipv4(dst_addr)) =>
                                     (src_addr, dst_addr),
                                     (src_addr, dst_addr),
-                                _ => unimplemented!()
+                                // We've lowered all addresses to a concrete form.
+                                _ => unreachable!()
                             };
                             };
 
 
                         let payload = ArpRepr::EthernetIpv4 {
                         let payload = ArpRepr::EthernetIpv4 {