Update for rustc 1.25 nightly.
This commit is contained in:
parent
2fe4cd3a92
commit
5111131e61
@ -158,7 +158,7 @@ impl<'a, K: Ord + 'a, V: 'a> ManagedMap<'a, K, V> {
|
||||
Err((key, new_value)), // full
|
||||
Err(idx) => {
|
||||
let rotate_by = pairs.len() - idx - 1;
|
||||
pairs[idx..].rotate(rotate_by);
|
||||
pairs[idx..].rotate_left(rotate_by);
|
||||
assert!(pairs[idx].is_none(), "broken invariant");
|
||||
pairs[idx] = Some((key, new_value));
|
||||
Ok(None)
|
||||
@ -184,7 +184,7 @@ impl<'a, K: Ord + 'a, V: 'a> ManagedMap<'a, K, V> {
|
||||
match binary_search_by_key(pairs, key) {
|
||||
Ok(idx) => {
|
||||
let (_key, value) = pairs[idx].take().expect("broken invariant");
|
||||
pairs[idx..].rotate(1);
|
||||
pairs[idx..].rotate_left(1);
|
||||
Some(value)
|
||||
}
|
||||
Err(_) => None
|
||||
|
Loading…
Reference in New Issue
Block a user