fix a typo
pull/585/head
tanliwei 3 years ago committed by GitHub
parent 7e44e87a77
commit af1768d9f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -20,7 +20,7 @@ fn main() {
let word = first_word(&my_string[0..6]); let word = first_word(&my_string[0..6]);
let word = first_word(&my_string[..]); let word = first_word(&my_string[..]);
// `first_word` 也适用于 `String` 的引用, // `first_word` 也适用于 `String` 的引用,
// 这等价于个 `String` 的 slice // 这等价于个 `String` 的 slice
let word = first_word(&my_string); let word = first_word(&my_string);
let my_string_literal = "hello world"; let my_string_literal = "hello world";

Loading…
Cancel
Save