From 5111131e61513ada3cc83f100adaa85c27993ec2 Mon Sep 17 00:00:00 2001 From: whitequark Date: Fri, 12 Jan 2018 23:03:39 +0000 Subject: [PATCH] Update for rustc 1.25 nightly. --- src/map.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/map.rs b/src/map.rs index 8528a73..bc16be0 100644 --- a/src/map.rs +++ b/src/map.rs @@ -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