Remove Array::replace_elem

Doesn't seem very useful...
This commit is contained in:
Brendan Zabarauskas 2015-11-14 22:04:04 +11:00
parent 70dbef1eb1
commit dcb0afd57b

View file

@ -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<Output = <Self as Array>::Element>;