Make shape check a one-liner in impl PartialEq for Matrix
This commit is contained in:
parent
d35ef06f44
commit
08d990f276
|
@ -1356,10 +1356,7 @@ where
|
|||
{
|
||||
#[inline]
|
||||
fn eq(&self, right: &Matrix<N, R2, C2, S2>) -> bool {
|
||||
if self.shape() == right.shape() {
|
||||
return self.iter().zip(right.iter()).all(|(l, r)| l == r)
|
||||
}
|
||||
false
|
||||
self.shape() == right.shape() && self.iter().zip(right.iter()).all(|(l, r)| l == r)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue