Merge pull request #127 from tinco/index_transmute_bug
This reference should not be mut
This commit is contained in:
commit
a0f2587ebe
|
@ -292,7 +292,7 @@ macro_rules! index_impl(
|
||||||
|
|
||||||
fn index(&self, (i, j): (usize, usize)) -> &N {
|
fn index(&self, (i, j): (usize, usize)) -> &N {
|
||||||
unsafe {
|
unsafe {
|
||||||
&mem::transmute::<&$t<N>, &mut [N; $dim * $dim]>(self)[i + j * $dim]
|
&mem::transmute::<&$t<N>, & [N; $dim * $dim]>(self)[i + j * $dim]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue