2018-02-22 00:09:53 -06:00
|
|
|
// primitive_types4.rs
|
2019-11-12 05:50:33 -06:00
|
|
|
// Get a slice out of Array a where the ??? is so that the test passes.
|
|
|
|
// Execute `rustlings hint primitive_types4` for hints!!
|
2016-02-07 11:24:38 -06:00
|
|
|
|
2019-11-11 06:38:24 -06:00
|
|
|
// I AM NOT DONE
|
|
|
|
|
2019-08-17 19:14:00 -05:00
|
|
|
#[test]
|
2019-11-12 05:50:33 -06:00
|
|
|
fn slice_out_of_array() {
|
2016-02-07 11:24:38 -06:00
|
|
|
let a = [1, 2, 3, 4, 5];
|
|
|
|
|
|
|
|
let nice_slice = ???
|
|
|
|
|
2019-08-17 19:14:00 -05:00
|
|
|
assert_eq!([2, 3, 4], nice_slice)
|
2016-02-07 11:24:38 -06:00
|
|
|
}
|