Skip to content

Commit

Permalink
Split up a long sentence
Browse files Browse the repository at this point in the history
  • Loading branch information
carols10cents committed Apr 15, 2019
1 parent aa82907 commit 6678e82
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ch04-03-slices.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 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!
truncate the `String`, it needs to get a mutable reference. Rust disallows
this, and compilation 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

Expand Down

0 comments on commit 6678e82

Please sign in to comment.