diff --git a/src/main.rs b/src/main.rs index 7e5409f..43f4b67 100644 --- a/src/main.rs +++ b/src/main.rs @@ -17,13 +17,13 @@ fn parse_input() -> Result<(Vec, Vec)> { for line in stdin().lines().map_while(Result::ok) { if line.starts_with("Time:") { times = numbers - .captures_iter(&line) + .captures_iter(&line.replace(' ', "")) .map(|c| c.get(1).unwrap().as_str().parse()) .map_while(Result::ok) .collect(); } else if line.starts_with("Distance:") { distances = numbers - .captures_iter(&line) + .captures_iter(&line.replace(' ', "")) .map(|c| c.get(1).unwrap().as_str().parse()) .map_while(Result::ok) .collect();