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]
|
#[inline]
|
||||||
fn eq(&self, right: &Matrix<N, R2, C2, S2>) -> bool {
|
fn eq(&self, right: &Matrix<N, R2, C2, S2>) -> bool {
|
||||||
if self.shape() == right.shape() {
|
self.shape() == right.shape() && self.iter().zip(right.iter()).all(|(l, r)| l == r)
|
||||||
return self.iter().zip(right.iter()).all(|(l, r)| l == r)
|
|
||||||
}
|
|
||||||
false
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue