mirror of
https://github.com/rust-lang/rustlings.git
synced 2026-01-07 03:09:19 +00:00
Exercise 20
This commit is contained in:
parent
4456897abf
commit
b0f3cead0f
@ -5,13 +5,13 @@
|
||||
// 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 = ???
|
||||
let nice_slice = &a[1..4];//index into array slice
|
||||
|
||||
assert_eq!([2, 3, 4], nice_slice)
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user