Skip to content

Commit 21460fa

Browse files
authored
Merge pull request #454 from 0xByteLeon/master
fix: Correct the wrong answer to Exercise 11 in Chapter borrowing
2 parents f659004 + 1c83c69 commit 21460fa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

solutions/ownership/borrowing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,6 @@ fn main() {
149149

150150
// add one line below to make a compiler error: cannot borrow `s` as mutable more than once at a time
151151
// you can't use r1 and r2 at the same time
152-
r1.push_str("world");
152+
println!("{}, {}", r1, r2);
153153
}
154-
```
154+
```

0 commit comments

Comments
 (0)