Remove useless if in day02
This commit is contained in:
parent
6c80df7b20
commit
453a9ebeb8
@ -46,7 +46,7 @@ const Choice = enum(usize) {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
fn beats(self: Choice, other: Choice) bool {
|
fn beats(self: Choice, other: Choice) bool {
|
||||||
return if (other.win_choice() == self) true else false;
|
return other.win_choice() == self;
|
||||||
}
|
}
|
||||||
fn ties(self: Choice, other: Choice) bool {
|
fn ties(self: Choice, other: Choice) bool {
|
||||||
return self == other;
|
return self == other;
|
||||||
|
Loading…
Reference in New Issue
Block a user