mirror of
https://github.com/onyx-and-iris/aoc2023.git
synced 2024-11-21 18:00:47 +00:00
remove unnecessary assignment
This commit is contained in:
parent
3d42da7862
commit
b878eb9df6
@ -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.
|
||||||
|
Loading…
Reference in New Issue
Block a user