Merge pull request #585 from tanliwei/patch-2

fix a typo
pull/586/head
KaiserY 3 years ago committed by GitHub
commit a059d1cf7e
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