Update rust

Signed-off-by: Peter Atashian <retep998@gmail.com>
This commit is contained in:
Peter Atashian 2015-02-08 02:28:57 -05:00
parent 316298f825
commit 6b71de4665
5 changed files with 0 additions and 10 deletions

View File

@ -278,8 +278,6 @@ impl<N> Index<(usize, usize)> for DMat<N> {
}
impl<N> IndexMut<(usize, usize)> for DMat<N> {
type Output = N;
fn index_mut(&mut self, &(i, j): &(usize, usize)) -> &mut N {
assert!(i < self.nrows);
assert!(j < self.ncols);

View File

@ -86,8 +86,6 @@ macro_rules! dvec_impl(
}
impl<N> IndexMut<usize> for $dvec<N> {
type Output = N;
fn index_mut(&mut self, i: &usize) -> &mut N {
&mut self.as_mut_slice()[*i]
}

View File

@ -312,8 +312,6 @@ macro_rules! index_impl(
}
impl<N> IndexMut<(usize, usize)> for $t<N> {
type Output = N;
fn index_mut(&mut self, &(i, j): &(usize, usize)) -> &mut N {
unsafe {
&mut mem::transmute::<&mut $t<N>, &mut [N; $dim * $dim]>(self)[i + j * $dim]

View File

@ -30,8 +30,6 @@ impl<N> Index<usize> for vec::Vec0<N> {
}
impl<N> IndexMut<usize> for vec::Vec0<N> {
type Output = N;
#[inline]
fn index_mut(&mut self, _: &usize) -> &mut N {
panic!("Canot index a Vec0.")

View File

@ -234,8 +234,6 @@ macro_rules! index_impl(
}
impl<N> IndexMut<usize> for $t<N> {
type Output = N;
fn index_mut(&mut self, i: &usize) -> &mut N {
&mut self.as_array_mut()[*i]
}