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.
This commit is contained in:
@@ -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!();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user