diff --git a/src/bin/day_6.rs b/src/bin/day_6.rs index bcb0d5d..f561e65 100644 --- a/src/bin/day_6.rs +++ b/src/bin/day_6.rs @@ -7,7 +7,7 @@ fn parse(s: &str) -> Result { } #[aoc(day = 6, parse = parse, test_cases = ["day_6_1.txt", "day_6_2.txt", "day_6_3.txt", "day_6_4.txt"])] -fn day_6(mut input: Input) -> Result<()> { +fn day_6(input: Input) -> Result<()> { // Part 1 for i in 4..input.len() { let s = &input[i - 4..i]; diff --git a/src/bin/day_8.rs b/src/bin/day_8.rs index 16704be..98665f9 100644 --- a/src/bin/day_8.rs +++ b/src/bin/day_8.rs @@ -80,12 +80,12 @@ fn day_8(input: Input) -> Result<()> { // Part 2 let mut highest_score = 0; for x in 1..(width - 1) { - 'y:for y in 1..(height - 1) { + for y in 1..(height - 1) { let h = input[y][x]; let mut score = 1; - 'u: { + { // up let mut distance = 0; let mut y = y; @@ -99,7 +99,7 @@ fn day_8(input: Input) -> Result<()> { score *= distance; } - 'u: { + { // down let mut distance = 0; let mut y = y; @@ -113,7 +113,7 @@ fn day_8(input: Input) -> Result<()> { score *= distance; } - 'u: { + { // left let mut distance = 0; let mut x = x; @@ -127,7 +127,7 @@ fn day_8(input: Input) -> Result<()> { score *= distance; } - 'u: { + { // right let mut distance = 0; let mut x = x;