Skip to content

Commit f6cffc7

Browse files
committed
fix(option1): Add cast to usize, as it is confusing in the context of an exercise about Option
1 parent 1da84b5 commit f6cffc7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

exercises/option/option1.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ fn main() {
1818
((iter * 5) + 2) / (4 * 16)
1919
};
2020

21-
numbers[iter] = number_to_add;
21+
numbers[iter as usize] = number_to_add;
2222
}
2323
}

0 commit comments

Comments
 (0)