From af1768d9f2b22b0f7f357e59e58dc7c66ed788b6 Mon Sep 17 00:00:00 2001 From: tanliwei Date: Wed, 9 Feb 2022 14:56:11 +0800 Subject: [PATCH] fix a typo fix a typo --- listings/ch04-understanding-ownership/listing-04-09/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/listings/ch04-understanding-ownership/listing-04-09/src/main.rs b/listings/ch04-understanding-ownership/listing-04-09/src/main.rs index 2b71461..46677f7 100755 --- a/listings/ch04-understanding-ownership/listing-04-09/src/main.rs +++ b/listings/ch04-understanding-ownership/listing-04-09/src/main.rs @@ -20,7 +20,7 @@ fn main() { let word = first_word(&my_string[0..6]); let word = first_word(&my_string[..]); // `first_word` 也适用于 `String` 的引用, - // 这等价于真个 `String` 的 slice + // 这等价于整个 `String` 的 slice let word = first_word(&my_string); let my_string_literal = "hello world";