File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -284,9 +284,9 @@ error[E0502]: cannot borrow `s` as mutable because it is also borrowed as immuta
284
284
285
285
Recall from the borrowing rules that if we have an immutable reference to
286
286
something, we cannot also take a mutable reference. Because ` clear ` needs to
287
- truncate the ` String ` , it tries to take a mutable reference, which fails. Not
288
- only has Rust made our API easier to use, but it has also eliminated an entire
289
- class of errors at compile time!
287
+ truncate the ` String ` , it needs to get a mutable reference, which the compiler
288
+ disallows, which fails. Not only has Rust made our API easier to use, but it
289
+ has also eliminated an entire class of errors at compile time!
290
290
291
291
#### String Literals Are Slices
292
292
You can’t perform that action at this time.
0 commit comments