mirror of
https://github.com/rust-lang/rustlings.git
synced 2026-01-07 03:09:19 +00:00
Exercise 19
This commit is contained in:
parent
bb7bc32c53
commit
4456897abf
@ -5,10 +5,11 @@
|
||||
// Execute `rustlings hint primitive_types3` or use the `hint` watch subcommand
|
||||
// for a hint.
|
||||
|
||||
// I AM NOT DONE
|
||||
|
||||
|
||||
fn main() {
|
||||
let a = ???
|
||||
// let a = [0; 100];
|
||||
let a : [i32;100] = (0..100).collect::<Vec<i32>>().try_into().unwrap_or_else(|v : Vec<i32>| panic!("Expected a vec length of {} but it was {}",100,v.len()));
|
||||
|
||||
if a.len() >= 100 {
|
||||
println!("Wow, that's a big array!");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user