File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 27
27
| [ Day 14: Restroom Redoubt] ( src/solutions/year2024/day14.rs ) | ⭐⭐ | 0.172 | 102.252 |
28
28
| [ Day 15: Warehouse Woes] ( src/solutions/year2024/day15.rs ) | ⭐⭐ | 7.226 | 9.084 |
29
29
| [ Day 16: Reindeer Maze] ( src/solutions/year2024/day16.rs ) | ⭐⭐ | 6.478 | 24.347 |
30
- | [ Day 17: Chronospatial Computer] ( src/solutions/year2024/day17.rs ) | ⭐ | 0.096 | - |
30
+ | [ Day 17: Chronospatial Computer] ( src/solutions/year2024/day17.rs ) | ⭐ | 0.038 | - |
31
31
| [ Day 18: RAM Run] ( src/solutions/year2024/day18.rs ) | ⭐⭐ | 2.487 | 204.885 |
32
32
| [ Day 19: Linen Layout] ( src/solutions/year2024/day19.rs ) | ⭐⭐ | 2.923 | 22.751 |
33
33
| [ Day 20: Race Condition] ( src/solutions/year2024/day20.rs ) | ⭐⭐ | 7.355 | 280.627 |
Original file line number Diff line number Diff line change @@ -69,9 +69,11 @@ impl Program {
69
69
let mut instruction_pointer = 0 ;
70
70
let mut output = Vec :: new ( ) ;
71
71
72
- while let Some ( opcode) = self . program . get ( instruction_pointer) {
72
+ while let Some ( [ opcode, operand] ) = self
73
+ . program
74
+ . get ( instruction_pointer..=instruction_pointer + 1 )
75
+ {
73
76
let operation = InstructionType :: from ( * opcode) ;
74
- let operand = self . program . get ( instruction_pointer + 1 ) . unwrap ( ) ;
75
77
let mut do_jump = true ;
76
78
77
79
match operation {
You can’t perform that action at this time.
0 commit comments