Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unclear wording 4.3 #1907

Merged
merged 1 commit into from
Apr 15, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 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
L0uisc marked this conversation as resolved.
Show resolved Hide resolved
has also eliminated an entire class of errors at compile time!

#### String Literals Are Slices

Expand Down