Update rust
Signed-off-by: Peter Atashian <retep998@gmail.com>
This commit is contained in:
parent
316298f825
commit
6b71de4665
|
@ -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);
|
||||
|
|
|
@ -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]
|
||||
}
|
||||
|
|
|
@ -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]
|
||||
|
|
|
@ -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.")
|
||||
|
|
|
@ -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]
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue