From b878eb9df60585d0fd4693cebfae6b922979d231 Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Thu, 14 Dec 2023 04:24:57 +0000 Subject: [PATCH] remove unnecessary assignment --- day-13/one.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/day-13/one.go b/day-13/one.go index 1da0339..ff29d2b 100644 --- a/day-13/one.go +++ b/day-13/one.go @@ -30,14 +30,12 @@ func findReflection(image []string) (int, bool) { // horizontalReflection returns the reflection point of a horizontal mirror func horizontalReflection(image img, fn func(image []string) (int, bool)) (int, bool) { - n, ok := fn(image.raw) - return n, ok + return fn(image.raw) } // verticalReflection returns the reflection point of a vertical mirror func verticalReflection(image img, fn func(image []string) (int, bool)) (int, bool) { - n, ok := fn(image.transposed()) - return n, ok + return fn(image.transposed()) } // one returns a calculation based on reflection points for all images.