File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 9494| [ Day 5: Doesn't He Have Intern-Elves For This?] ( src/solutions/year2015/day05.rs ) | ⭐⭐ | 0.261 | 0.987 |
9595| [ Day 6: Probably a Fire Hazard] ( src/solutions/year2015/day06.rs ) | ⭐⭐ | 871.538 | 817.533 |
9696| [ Day 7: Some Assembly Required] ( src/solutions/year2015/day07.rs ) | ⭐⭐ | 0.308 | 0.293 |
97- | [ Day 8: Matchsticks] ( src/solutions/year2015/day08.rs ) | ⭐⭐ | 0.171 | 0.451 |
97+ | [ Day 8: Matchsticks] ( src/solutions/year2015/day08.rs ) | ⭐⭐ | 0.052 | 0.129 |
9898
9999# TODO
100100
Original file line number Diff line number Diff line change @@ -42,8 +42,9 @@ impl Day08 {
4242 break ;
4343 }
4444
45- if word. chars ( ) . nth ( i) . unwrap ( ) == '\\' {
46- if word. chars ( ) . nth ( i + 1 ) . unwrap ( ) == 'x' {
45+ let slice = & word[ i..=( i + 1 ) ] ;
46+ if slice. starts_with ( '\\' ) {
47+ if slice == "\\ x" {
4748 i += 3 ;
4849 } else {
4950 i += 1 ;
You can’t perform that action at this time.
0 commit comments