浏览代码

Remove some redundant closures

These were flagged by `cargo clippy`:

    warning: redundant closure found
Alex Crawford 4 年之前
父节点
当前提交
ebe2449bcc
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/wire/icmpv6.rs

+ 2 - 2
src/wire/icmpv6.rs

@@ -624,10 +624,10 @@ impl<'a> Repr<'a> {
             },
             #[cfg(feature = "ethernet")]
             (msg_type, 0) if msg_type.is_ndisc() => {
-                NdiscRepr::parse(packet).map(|repr| Repr::Ndisc(repr))
+                NdiscRepr::parse(packet).map(Repr::Ndisc)
             },
             (msg_type, 0) if msg_type.is_mld() => {
-                MldRepr::parse(packet).map(|repr| Repr::Mld(repr))
+                MldRepr::parse(packet).map(Repr::Mld)
             },
             _ => Err(Error::Unrecognized)
         }