From f6cffc7e487b42f15a6f958e49704c93a8d4465b Mon Sep 17 00:00:00 2001 From: Rob Story Date: Sat, 2 May 2020 16:39:37 -0700 Subject: [PATCH] fix(option1): Add cast to usize, as it is confusing in the context of an exercise about Option --- exercises/option/option1.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/option/option1.rs b/exercises/option/option1.rs index 51c39f5..2a6c2f7 100644 --- a/exercises/option/option1.rs +++ b/exercises/option/option1.rs @@ -18,6 +18,6 @@ fn main() { ((iter * 5) + 2) / (4 * 16) }; - numbers[iter] = number_to_add; + numbers[iter as usize] = number_to_add; } }