mirror of
https://github.com/sunface/rust-by-practice.git
synced 2025-06-22 20:19:42 +00:00
Merge pull request #454 from 0xByteLeon/master
fix: Correct the wrong answer to Exercise 11 in Chapter borrowing
This commit is contained in:
@ -149,6 +149,6 @@ fn main() {
|
||||
|
||||
// add one line below to make a compiler error: cannot borrow `s` as mutable more than once at a time
|
||||
// you can't use r1 and r2 at the same time
|
||||
r1.push_str("world");
|
||||
println!("{}, {}", r1, r2);
|
||||
}
|
||||
```
|
||||
```
|
||||
|
Reference in New Issue
Block a user