mirror of
https://github.com/onyx-and-iris/aoc2023.git
synced 2026-04-18 03:03:31 +00:00
remove unnecessary assignment
This commit is contained in:
@@ -30,14 +30,12 @@ func findReflection(image []string) (int, bool) {
|
|||||||
|
|
||||||
// horizontalReflection returns the reflection point of a horizontal mirror
|
// horizontalReflection returns the reflection point of a horizontal mirror
|
||||||
func horizontalReflection(image img, fn func(image []string) (int, bool)) (int, bool) {
|
func horizontalReflection(image img, fn func(image []string) (int, bool)) (int, bool) {
|
||||||
n, ok := fn(image.raw)
|
return fn(image.raw)
|
||||||
return n, ok
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// verticalReflection returns the reflection point of a vertical mirror
|
// verticalReflection returns the reflection point of a vertical mirror
|
||||||
func verticalReflection(image img, fn func(image []string) (int, bool)) (int, bool) {
|
func verticalReflection(image img, fn func(image []string) (int, bool)) (int, bool) {
|
||||||
n, ok := fn(image.transposed())
|
return fn(image.transposed())
|
||||||
return n, ok
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// one returns a calculation based on reflection points for all images.
|
// one returns a calculation based on reflection points for all images.
|
||||||
|
|||||||
Reference in New Issue
Block a user