Include a serde feature in the shared crate

This commit is contained in:
2024-03-23 13:36:28 +01:00
parent 3d93bf0fda
commit f1962503b8
22 changed files with 134 additions and 281 deletions

View File

@@ -54,11 +54,7 @@ impl Hand {
}
pub fn remove(&mut self, idx: usize) -> Option<Tile> {
if idx < self.tiles.len() {
Some(self.tiles.remove(idx))
} else {
None
}
(idx < self.tiles.len()).then(|| self.tiles.remove(idx))
}
pub fn iter(&self) -> impl Iterator<Item = &Tile> {