From dcb0afd57bbaab8e47fc0e17c8637bd1933060e4 Mon Sep 17 00:00:00 2001 From: Brendan Zabarauskas Date: Sat, 14 Nov 2015 22:04:04 +1100 Subject: [PATCH] Remove Array::replace_elem Doesn't seem very useful... --- src/array.rs | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/array.rs b/src/array.rs index 2a480df..7589472 100644 --- a/src/array.rs +++ b/src/array.rs @@ -13,7 +13,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -use std::mem; use std::ptr; use std::ops::*; @@ -46,12 +45,6 @@ pub trait Array where unsafe { ptr::swap(&mut self[i], &mut self[j]) }; } - /// Replace an element in the array. - #[inline] - fn replace_elem(&mut self, i: usize, src: Self::Element) -> Self::Element { - mem::replace(&mut self[i], src) - } - /// The sum of the elements of the array. fn sum(self) -> Self::Element where Self::Element: Add::Element>;