diff --git a/src/basic/compound-type/string-slice.md b/src/basic/compound-type/string-slice.md index b96c1238..7acdb36f 100644 --- a/src/basic/compound-type/string-slice.md +++ b/src/basic/compound-type/string-slice.md @@ -99,7 +99,7 @@ let slice = &s[..]; 字符串切片的类型标识是 `&str`,因此我们可以这样声明一个函数,输入 `String` 类型,返回它的切片: `fn first_word(s: &String) -> &str `。 -有了切片就可以写出这样的安全代码: +有了切片就可以写出这样的代码: ```rust fn main() {