From f5fa964e557a08662904230f680ecaf7a11e1ce1 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Thu, 2 Apr 2026 05:47:24 +0100 Subject: [PATCH] modes:mod: use matches! instead of assert!(match...) Give it up for Clippy, MVP of this codebase. --- src/modes/mod.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/modes/mod.rs b/src/modes/mod.rs index 8c439aa..cea40a4 100644 --- a/src/modes/mod.rs +++ b/src/modes/mod.rs @@ -24,13 +24,13 @@ mod tests { ) -> (Footstool, Footstool) { let res1 = x.footstool(y); let res2 = y.footstool(x); - assert!(match (res1, res2) { + matches!( + (res1, res2), (Footstool::None, Footstool::None) - | (Footstool::None, Footstool::Half) - | (Footstool::Half, Footstool::None) - | (Footstool::Full, Footstool::Full) => true, - _ => false, - }); + | (Footstool::None, Footstool::Half) + | (Footstool::Half, Footstool::None) + | (Footstool::Full, Footstool::Full) + ); (res1, res2) } }