Skip to content

Commit

Permalink
Clone matrix element instead of copy
Browse files Browse the repository at this point in the history
Co-Authored-By: Sébastien Crozet <sebastien@crozet.re>
  • Loading branch information
Andlon and sebcrozet committed Aug 13, 2019
1 parent 2a01dd6 commit 7dbc0c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/base/matrix.rs
Expand Up @@ -157,7 +157,7 @@ impl<N: Scalar, R: Dim, C: Dim, S: Storage<N, R, C>> matrixcompare::Matrix<N> fo
#[cfg(feature = "matrixcompare")]
impl<N: Scalar, R: Dim, C: Dim, S: Storage<N, R, C>> matrixcompare::DenseAccessor<N> for Matrix<N, R, C, S> {
fn fetch_single(&self, row: usize, col: usize) -> N {
self.index((row, col)).clone()
*self.index((row, col))
}
}

Expand Down

0 comments on commit 7dbc0c0

Please sign in to comment.