Merge pull request #176 from AllanDowney/patch-1

string-slice: fix missing 's'
pull/177/head
Sunface 3 years ago committed by GitHub
commit e2d428189a
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