remove unnecessary assignment

This commit is contained in:
onyx-and-iris 2023-12-14 04:24:57 +00:00
parent 3d42da7862
commit b878eb9df6

View File

@ -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.