From 1a6e50f638ab8550aaf98ac1a9c97d5cf3d83764 Mon Sep 17 00:00:00 2001 From: Kun Liu Date: Wed, 30 Mar 2022 17:18:17 +0800 Subject: [PATCH] fix example in `string-slice.md` --- src/basic/compound-type/string-slice.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/basic/compound-type/string-slice.md b/src/basic/compound-type/string-slice.md index 06404672..cbab31be 100644 --- a/src/basic/compound-type/string-slice.md +++ b/src/basic/compound-type/string-slice.md @@ -292,8 +292,7 @@ fn main() { s.push('r'); println!("追加字符 push() -> {}", s); - s.push_str("ust!") - ; + s.push_str("ust!"); println!("追加字符串 push_str() -> {}", s); } ``` @@ -675,4 +674,4 @@ for b in "中国人".bytes() { ## 引用资料 -1. https://blog.csdn.net/a1595901624/article/details/119294443 \ No newline at end of file +1. https://blog.csdn.net/a1595901624/article/details/119294443