From a636bff3aacfd949a864255544249a495293eb24 Mon Sep 17 00:00:00 2001 From: Joe Ardent Date: Mon, 5 Dec 2022 14:01:03 -0800 Subject: [PATCH] don't destructure tuple before repacking --- 2022-aoc/src/d4.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/2022-aoc/src/d4.rs b/2022-aoc/src/d4.rs index 28bd491..417f3ba 100644 --- a/2022-aoc/src/d4.rs +++ b/2022-aoc/src/d4.rs @@ -8,8 +8,8 @@ fn parse_input(input: &str) -> Vec { let mut out = Vec::with_capacity(input.len()); for line in input.lines() { let (a, b) = line.split_once(',').unwrap(); - let (a, b) = (get_range(a), get_range(b)); - out.push((a, b)); + let assignment = (get_range(a), get_range(b)); + out.push(assignment); } out