diff --git a/2022/rust/src/day4.rs b/2022/rust/src/day4.rs index 32917ca..019e59d 100644 --- a/2022/rust/src/day4.rs +++ b/2022/rust/src/day4.rs @@ -8,8 +8,7 @@ fn main() { fn nums(input: &str) -> Vec { input - .replace(",", "-") - .split("-") + .split(&['-', ',']) .map(|s| s.parse::().unwrap()) .collect() }