From cf01157cd0ed78b321b57374f0d78ec50db51a6b Mon Sep 17 00:00:00 2001 From: A4-Tacks Date: Sat, 13 Jun 2026 17:55:30 +0800 Subject: [PATCH 1/2] Slice 'first' confused --- src/ch04-03-slices.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ch04-03-slices.md b/src/ch04-03-slices.md index 7f145baf1d..e97ff51928 100644 --- a/src/ch04-03-slices.md +++ b/src/ch04-03-slices.md @@ -306,9 +306,9 @@ part of an array. We’d do so like this: ```rust let a = [1, 2, 3, 4, 5]; -let slice = &a[1..3]; +let slice = &a[2..4]; -assert_eq!(slice, &[2, 3]); +assert_eq!(slice, &[3, 4]); ``` This slice has the type `&[i32]`. It works the same way as string slices do, by From 0b041ac2871d264191323ff58521bca6d59fc9d4 Mon Sep 17 00:00:00 2001 From: A4-Tacks Date: Wed, 1 Jul 2026 23:29:34 +0800 Subject: [PATCH 2/2] Change 'the first' to 'its first' --- src/ch04-03-slices.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ch04-03-slices.md b/src/ch04-03-slices.md index e97ff51928..654d95ea5c 100644 --- a/src/ch04-03-slices.md +++ b/src/ch04-03-slices.md @@ -312,7 +312,7 @@ assert_eq!(slice, &[3, 4]); ``` This slice has the type `&[i32]`. It works the same way as string slices do, by -storing a reference to the first element and a length. You’ll use this kind of +storing a reference to its first element and a length. You’ll use this kind of slice for all sorts of other collections. We’ll discuss these collections in detail when we talk about vectors in Chapter 8.