Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: smoltcp-rs/smoltcp
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: c03bb50dc16b
Choose a base ref
...
head repository: smoltcp-rs/smoltcp
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: ffb5020f87b2
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on May 2, 2020

  1. Assign map instead of using mem::replace.

    This fixes build on latest nightly. The cause of the breakage
    is this commit:
    
    rust-lang/rust@7c4ca59
    
    which added a #[must_use = "if you don't need the old value, you
    can just assign the new value directly"] hint to mem::replace.
    Dirbaio authored and whitequark committed May 2, 2020
    Copy the full SHA
    ffb5020 View commit details
Showing with 1 addition and 4 deletions.
  1. +1 −4 src/iface/neighbor.rs
5 changes: 1 addition & 4 deletions src/iface/neighbor.rs
Original file line number Diff line number Diff line change
@@ -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;
}
}
};