From 36a4a5e4628623abba14e8f04ca85023cf5593dd Mon Sep 17 00:00:00 2001
From: Colin <mail@co1in.me>
Date: Fri, 28 Jan 2022 17:00:38 +0800
Subject: [PATCH] make the explanation more clear

---
 book/contents/basic/compound-type/string-slice.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/book/contents/basic/compound-type/string-slice.md b/book/contents/basic/compound-type/string-slice.md
index 55666e33..fffe1d2e 100644
--- a/book/contents/basic/compound-type/string-slice.md
+++ b/book/contents/basic/compound-type/string-slice.md
@@ -119,7 +119,7 @@ error[E0502]: cannot borrow `s` as mutable because it is also borrowed as immuta
    |                                       ---- immutable borrow later used here
 ```
 
-回忆一下借用的规则:当我们已经有了可变借用时,就无法再拥有不可变的借用。因为 `clear` 需要清空改变 `String`,因此它需要一个可变借用,而之后的 `println!` 又使用了不可变借用,因此编译无法通过。
+回忆一下借用的规则:当我们已经有了可变借用时,就无法再拥有不可变的借用。因为 `clear` 需要清空改变 `String`,因此它需要一个可变借用(利用 VSCode 可以看到该方法的声明是 `pub fn clear(&mut self)` ,参数是对自身的可变借用 );而之后的 `println!` 又使用了不可变借用,也就是在 `s.clear()` 处可变借用与不可变借用试图同时生效,因此编译无法通过。
 
 从上述代码可以看出,Rust 不仅让我们的 `API` 更加容易使用,而且也在编译期就消除了大量错误!