rustlings/exercises/primitive_types/primitive_types4.rs

15 lines
336 B
Rust
Raw Normal View History

2018-02-22 00:09:53 -06:00
// primitive_types4.rs
// Get a slice out of Array a where the ??? is so that the test passes.
2022-07-12 07:54:12 -05:00
// 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];
2020-04-08 03:42:35 -05:00
let nice_slice = ???
assert_eq!([2, 3, 4], nice_slice)
}