Merge pull request #90 from retep998/update-rust

Update rust
This commit is contained in:
Sébastien Crozet 2015-02-08 23:03:53 +01:00
commit 4065341aa0
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]
}