From b0f3cead0f3b7dccf897236009c58ec246baf1ce Mon Sep 17 00:00:00 2001 From: akshitgautam42 Date: Sun, 12 Nov 2023 11:57:08 +0530 Subject: [PATCH] Exercise 20 --- exercises/04_primitive_types/primitive_types4.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exercises/04_primitive_types/primitive_types4.rs b/exercises/04_primitive_types/primitive_types4.rs index d44d8776..eea344aa 100644 --- a/exercises/04_primitive_types/primitive_types4.rs +++ b/exercises/04_primitive_types/primitive_types4.rs @@ -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) }