primitive_types4.rs

This commit is contained in:
stephan.klauberg 2023-10-06 07:53:40 +02:00
parent 78a4f7215e
commit 2bacd04fb1

View File

@ -5,13 +5,13 @@
// Execute `rustlings hint primitive_types4` or use the `hint` watch subcommand
// for a hint.
// I AM NOT DONE
// I AM DONE
#[test]
fn slice_out_of_array() {
let a = [1, 2, 3, 4, 5];
let nice_slice = ???
let nice_slice = &a[1..4];
assert_eq!([2, 3, 4], nice_slice)
}