mirror of https://github.com/rust-lang/rustlings
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
336 B
Rust
15 lines
336 B
Rust
// primitive_types4.rs
|
|
// Get a slice out of Array a where the ??? is so that the test passes.
|
|
// Execute `rustlings hint primitive_types4` or use the `hint` watch subcommand for a hint.
|
|
|
|
// I AM NOT DONE
|
|
|
|
#[test]
|
|
fn slice_out_of_array() {
|
|
let a = [1, 2, 3, 4, 5];
|
|
|
|
let nice_slice = ???
|
|
|
|
assert_eq!([2, 3, 4], nice_slice)
|
|
}
|