modes:mod|single: fix issue with footstool not taking other by reference

This commit is contained in:
2026-04-02 05:46:45 +01:00
committed by oreodave
parent e401819914
commit 71f644043a
2 changed files with 9 additions and 9 deletions

View File

@@ -9,7 +9,7 @@ pub enum Footstool {
}
pub trait Hand {
fn footstool(&self, other: Self) -> Footstool;
fn footstool(&self, other: &Self) -> Footstool;
}
mod tests {
@@ -22,8 +22,8 @@ mod tests {
x: &T,
y: &T,
) -> (Footstool, Footstool) {
let res1 = x.footstool(*y);
let res2 = y.footstool(*x);
let res1 = x.footstool(y);
let res2 = y.footstool(x);
assert!(match (res1, res2) {
(Footstool::None, Footstool::None)
| (Footstool::None, Footstool::Half)