diff --git a/src/collections/raw_vec.rs b/src/collections/raw_vec.rs index a506831c8f86d3fe80bc93e9030a7b89a1fbeaef..91ecb47b9c7f79f7d79db83ed638628104da6a22 100644 --- a/src/collections/raw_vec.rs +++ b/src/collections/raw_vec.rs @@ -62,20 +62,6 @@ impl RawVec { } } - /// Moves the elements in the range [from_idx, from_idx + num_to_move) to - /// the range [to_idx, to_idx + num_to_move). Caller must make sure that all - /// non-overlapping elements of the second range had their destructor called - /// in case those elements were used. - pub fn move_range(&mut self, from_idx: usize, to_idx: usize, num_to_move: usize) { - debug_assert!(from_idx + num_to_move <= self.len); - debug_assert!(to_idx + num_to_move <= self.len); // maybe not in future, for now this is fine - unsafe { - let source = self.base.add(from_idx); - let target = self.base.add(to_idx); - std::ptr::copy(source, target, num_to_move); - } - } - pub fn len(&self) -> usize { return self.len; }