From 765e0d90cfbcf5d1caa735f2de32d4d8deb35632 Mon Sep 17 00:00:00 2001 From: Andrew Coleman Date: Sun, 24 Dec 2023 16:49:25 -0500 Subject: [PATCH] remove println --- 2023/src/day13.rs | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/2023/src/day13.rs b/2023/src/day13.rs index e43d9a1..d84710f 100644 --- a/2023/src/day13.rs +++ b/2023/src/day13.rs @@ -113,7 +113,6 @@ impl Map { matches.push(m); } - println!("matches {:?}", matches); let mut res: Vec> = vec![]; for &(r1, r2) in matches.iter() { let mut rows_matched = 0; @@ -121,13 +120,6 @@ impl Map { loop { let start = r1 - rows_matched; let end = r2 + rows_matched; - println!( - "comparing {} to {} with {} and {}", - start, - end, - board[start].iter().collect::(), - board[end].iter().collect::(), - ); if board[start] == board[end] { rows_matched += 1; } else { @@ -145,10 +137,6 @@ impl Map { break; } } - println!( - "{},{} rows matched {} diff_chars {}", - r1, r2, rows_matched, diff_chars - ); if diff_chars == 1 { res.push(Some((r1, r2))); @@ -165,29 +153,20 @@ impl Map { } fn get_horiz_smudge(&self) -> Option { - println!("get horiz smudge"); - if let Some((r1, r2)) = self.find_smudge(&self.rows) { - println!("got horiz smudge rows of {},{}", r1, r2); + if let Some((_r1, r2)) = self.find_smudge(&self.rows) { return Some(100 * r2); } None } fn get_vert_smudge(&self) -> Option { - println!("get vert smudge"); - if let Some((c1, c2)) = self.find_smudge(&self.cols) { - println!("got vert smudge cols of {},{}", c1, c2); + if let Some((_c1, c2)) = self.find_smudge(&self.cols) { return Some(c2); } None } fn part2(&self) -> usize { - println!(); - for line in self.rows.iter() { - println!("{}", line.iter().collect::()); - } - println!("width {} height {}", self.width, self.height); let hscore = self.get_horiz_smudge(); let vscore = self.get_vert_smudge(); if hscore.is_some() && vscore.is_some() {