From 4a17666bba1a9582d22d17320bd4219b99c7aea5 Mon Sep 17 00:00:00 2001 From: Robert Garrett Date: Sat, 23 Aug 2025 09:38:49 -0500 Subject: [PATCH] Card's methods take values, not references I expect that we will not want to retain the original copy of a Card after merging, cutting, rotating, etc. This function signature says that the value moves into the method and goes away. If this becomes an annoyance, then we change it. --- src/card.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/card.rs b/src/card.rs index bd796a0..56c623b 100644 --- a/src/card.rs +++ b/src/card.rs @@ -115,19 +115,19 @@ impl Card { } /// Cuts this Card on the given line. Returns two cards - pub fn cut(&self, line: CutLine) -> (Self, Self) { + pub fn cut(self, line: CutLine) -> (Self, Self) { todo!(); } - pub fn flip(&self, flip: FlipDir) -> (Self) { + pub fn flip(self, flip: FlipDir) -> Self { todo!(); } - pub fn transpose(&self, other: &Self, selection: TransposeSelection) -> (Self, Self) { + pub fn transpose(self, other: Self, selection: TransposeSelection) -> (Self, Self) { todo!(); } - pub fn rotate(&self, dir: RotationDir) { + pub fn rotate(self, dir: RotationDir) { todo!(); } }