mirror of
https://github.com/KaiserY/trpl-zh-cn
synced 2024-11-09 08:51:18 +08:00
fix a typo
fix a typo
This commit is contained in:
parent
7e44e87a77
commit
af1768d9f2
@ -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";
|
||||
|
Loading…
Reference in New Issue
Block a user