We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3a68a0b commit 98970e6Copy full SHA for 98970e6
src/day23.rs
@@ -44,15 +44,15 @@ pub fn part1(s: &str) -> u64 {
44
45
let mut sum = 0;
46
for c in 0..26 {
47
- for con in &connections[c as usize] {
+ for con in connections.get_unchecked(c as usize) {
48
if *con < c {
49
continue;
50
}
51
- for concon in &connections[*con as usize] {
+ for concon in connections.get_unchecked(*con as usize) {
52
if *concon < *con {
53
54
55
- for conconcon in &connections[*concon as usize] {
+ for conconcon in connections.get_unchecked(*concon as usize) {
56
if *conconcon == c {
57
sum += 1;
58
break;
0 commit comments