From 173c4456ef8e396a0e32c470706a478c47d7456a Mon Sep 17 00:00:00 2001 From: Louis Cloete <38226392+L0uisc@users.noreply.github.com> Date: Tue, 9 Apr 2019 17:18:02 +0200 Subject: [PATCH] Fix unclear wording in 4.3 --- src/ch04-03-slices.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ch04-03-slices.md b/src/ch04-03-slices.md index de12cee576..abeebbb30d 100644 --- a/src/ch04-03-slices.md +++ b/src/ch04-03-slices.md @@ -284,9 +284,9 @@ error[E0502]: cannot borrow `s` as mutable because it is also borrowed as immuta Recall from the borrowing rules that if we have an immutable reference to something, we cannot also take a mutable reference. Because `clear` needs to -truncate the `String`, it tries to take a mutable reference, which fails. Not -only has Rust made our API easier to use, but it has also eliminated an entire -class of errors at compile time! +truncate the `String`, it needs to get a mutable reference, which the compiler +disallows, which fails. Not only has Rust made our API easier to use, but it +has also eliminated an entire class of errors at compile time! #### String Literals Are Slices