mirror of
https://github.com/rust-lang/rustlings.git
synced 2026-01-10 12:49:18 +00:00
added comment to fix for options1
This commit is contained in:
parent
1059fbe390
commit
ccd2721335
@ -12,6 +12,7 @@ fn main() {
|
||||
print_number(Some(99));
|
||||
|
||||
let mut numbers: [Option<u16>; 5] = [None; 5]; // Issue #395 on rustlings
|
||||
// Using [0; 5]; Will fail to compile as the types are mismatched. Therefore putting Some or None into the default values of the array as you initialize is important to understand.
|
||||
for iter in 0..5 {
|
||||
let number_to_add: u16 = {
|
||||
((iter * 1235) + 2) / (4 * 16)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user