From b2bd814c8aef63adf2a57756a0cc46f60032db8c Mon Sep 17 00:00:00 2001 From: Andy Teijelo Date: Thu, 7 Dec 2023 11:54:11 -0500 Subject: [PATCH] day 6 part 2 --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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();