string-slice: fix missing 's'

pull/176/head
Fanyjie 3 years ago committed by GitHub
parent 2c4f6aebb1
commit 0ce15c5fe9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -167,7 +167,7 @@ Rust在语言级别只有一种字符串类型`str`,它通常是以引
fn main() {
// 创建一个空String
let mut s = String::new();
// 将&str类型的"hello,world"添加到中
// 将&str类型的"hello,world"添加到s
s.push_str("hello,world");
// 将字符'!'推入s中
s.push('!');

Loading…
Cancel
Save