Merge pull request #127 from tinco/index_transmute_bug

This reference should not be mut
This commit is contained in:
Sébastien Crozet 2015-05-11 19:09:49 +02:00
commit a0f2587ebe
1 changed files with 1 additions and 1 deletions

View File

@ -292,7 +292,7 @@ macro_rules! index_impl(
fn index(&self, (i, j): (usize, usize)) -> &N {
unsafe {
&mem::transmute::<&$t<N>, &mut [N; $dim * $dim]>(self)[i + j * $dim]
&mem::transmute::<&$t<N>, & [N; $dim * $dim]>(self)[i + j * $dim]
}
}
}