|
@@ -6,9 +6,6 @@ use managed::ManagedMap;
|
|
|
use wire::{EthernetAddress, IpAddress};
|
|
|
use time::{Duration, Instant};
|
|
|
|
|
|
-#[cfg(any(feature = "std", feature = "alloc"))]
|
|
|
-use core::mem;
|
|
|
-
|
|
|
/// A cached neighbor.
|
|
|
///
|
|
|
/// A neighbor mapping translates from a protocol address to a hardware address,
|
|
@@ -104,7 +101,7 @@ impl<'a> Cache<'a> {
|
|
|
.filter(|(_, v)| timestamp < v.expires_at)
|
|
|
.collect();
|
|
|
|
|
|
- mem::replace(map, new_btree_map);
|
|
|
+ *map = new_btree_map;
|
|
|
}
|
|
|
}
|
|
|
};
|