2018-02-22 06:09:53 +00:00
|
|
|
// primitive_types3.rs
|
2023-05-29 17:39:08 +00:00
|
|
|
//
|
2020-07-11 02:01:38 +00:00
|
|
|
// Create an array with at least 100 elements in it where the ??? is.
|
2023-05-29 17:39:08 +00:00
|
|
|
//
|
|
|
|
// Execute `rustlings hint primitive_types3` or use the `hint` watch subcommand
|
|
|
|
// for a hint.
|
2016-02-07 17:12:24 +00:00
|
|
|
|
2019-11-11 12:38:24 +00:00
|
|
|
// I AM NOT DONE
|
|
|
|
|
2016-02-07 17:12:24 +00:00
|
|
|
fn main() {
|
|
|
|
let a = ???
|
|
|
|
|
|
|
|
if a.len() >= 100 {
|
|
|
|
println!("Wow, that's a big array!");
|
|
|
|
} else {
|
|
|
|
println!("Meh, I eat arrays like that for breakfast.");
|
2023-09-08 14:42:16 +00:00
|
|
|
panic!("Array not big enough, more elements needed")
|
2016-02-07 17:12:24 +00:00
|
|
|
}
|
|
|
|
}
|