1
0
Fork 0
mirror of https://github.com/rust-lang/rustlings.git synced 2024-04-23 18:35:02 +02:00

fix(option1): Don't add only zeros to the numbers array

This commit is contained in:
Thomas Sauvajon 2020-05-27 18:50:24 +10:00
parent 06ef4cc654
commit cce6a44277
No known key found for this signature in database
GPG Key ID: 09DA5C248B2D1C24

View File

@ -15,7 +15,7 @@ fn main() {
let mut numbers: [Option<u16>; 5];
for iter in 0..5 {
let number_to_add: u16 = {
((iter * 5) + 2) / (4 * 16)
((iter * 1235) + 2) / (4 * 16)
};
numbers[iter as usize] = number_to_add;