Skip to content

Commit 2984b24

Browse files
committed
Simplify same_order
1 parent af0bc74 commit 2984b24

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

src/layout.rs

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -52,20 +52,7 @@ impl Layout {
5252
}
5353

5454
pub fn same_order(&self, other: &Layout) -> bool {
55-
match *self {
56-
Layout::C(_) => {
57-
match *other {
58-
Layout::C(_) => true,
59-
Layout::F(_) => false,
60-
}
61-
}
62-
Layout::F(_) => {
63-
match *other {
64-
Layout::C(_) => false,
65-
Layout::F(_) => true,
66-
}
67-
}
68-
}
55+
self.lapacke_layout() == other.lapacke_layout()
6956
}
7057

7158
pub fn as_shape(&self) -> Shape<Ix2> {

0 commit comments

Comments
 (0)