modes:mod: use matches! instead of assert!(match...)
Give it up for Clippy, MVP of this codebase.
This commit is contained in:
@@ -24,13 +24,13 @@ mod tests {
|
|||||||
) -> (Footstool, Footstool) {
|
) -> (Footstool, Footstool) {
|
||||||
let res1 = x.footstool(y);
|
let res1 = x.footstool(y);
|
||||||
let res2 = y.footstool(x);
|
let res2 = y.footstool(x);
|
||||||
assert!(match (res1, res2) {
|
matches!(
|
||||||
|
(res1, res2),
|
||||||
(Footstool::None, Footstool::None)
|
(Footstool::None, Footstool::None)
|
||||||
| (Footstool::None, Footstool::Half)
|
| (Footstool::None, Footstool::Half)
|
||||||
| (Footstool::Half, Footstool::None)
|
| (Footstool::Half, Footstool::None)
|
||||||
| (Footstool::Full, Footstool::Full) => true,
|
| (Footstool::Full, Footstool::Full)
|
||||||
_ => false,
|
);
|
||||||
});
|
|
||||||
(res1, res2)
|
(res1, res2)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user