From b3e7037f33bf792ac4e70f384930160407028e11 Mon Sep 17 00:00:00 2001 From: Matej Focko Date: Wed, 13 Dec 2023 21:39:29 +0100 Subject: [PATCH] day(13): take the factor out of helper function Signed-off-by: Matej Focko --- src/bin/day13.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bin/day13.rs b/src/bin/day13.rs index 7fdbd81..3bba81c 100644 --- a/src/bin/day13.rs +++ b/src/bin/day13.rs @@ -42,14 +42,14 @@ impl Pattern { .count() == allowed_error }) - .map(|y| 100 * (y + 1) as i32) + .map(|y| (y + 1) as i32) } fn score(&self, allowed_error: usize) -> i32 { if let Some(s) = self.check_vertically(allowed_error) { s } else if let Some(s) = self.check_horizontally(allowed_error) { - s + 100 * s } else { unreachable!() }