mirror of
https://github.com/rust-lang/rustlings
synced 2024-11-14 00:17:16 +00:00
Merge branch 'master' of https://github.com/sanjaykdragon/rustlings
This commit is contained in:
commit
05ca3d77f7
1 changed files with 3 additions and 3 deletions
|
@ -5,7 +5,7 @@
|
|||
|
||||
// you can modify anything EXCEPT for this function's sig
|
||||
fn print_number(maybe_number: Option<u16>) {
|
||||
println!("printing: {}", *maybe_number);
|
||||
println!("printing: {}", maybe_number.unwrap());
|
||||
}
|
||||
|
||||
fn main() {
|
||||
|
@ -15,9 +15,9 @@ fn main() {
|
|||
let mut numbers: [Option<u16>; 5];
|
||||
for iter in 0..5 {
|
||||
let number_to_add: u16 = {
|
||||
((iter * 5) + 2) / (4 * 16);
|
||||
((iter * 5) + 2) / (4 * 16)
|
||||
};
|
||||
|
||||
numbers[iter] = number_to_add;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue