diff --git a/src/bin/02.rs b/src/bin/02.rs index 9f78ccf..d52253d 100644 --- a/src/bin/02.rs +++ b/src/bin/02.rs @@ -86,13 +86,14 @@ impl FromStr for Game { if game_id.len() < 6 { return Err(ParseGameErr); } - let id = game_id[5..].parse::().map_err(|_| ParseGameErr)?; - let reveals = reveal_str - .trim() - .split(';') - .map(|reveal| reveal.parse::()) - .collect::, _>>()?; - Ok(Self { id, reveals }) + Ok(Self { + id: game_id[5..].parse::().map_err(|_| ParseGameErr)?, + reveals: reveal_str + .trim() + .split(';') + .map(|reveal| reveal.parse::()) + .collect::>()?, + }) } }