Skip to content

Commit 5286141

Browse files
authored
Merge pull request #571 from songhahaha66/patch-1
Fix mutable borrow error in borrowing.md example
2 parents e0e88e9 + db23329 commit 5286141

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
@@ -147,8 +147,8 @@ fn main() {
147147
let r1 = &mut s;
148148
let r2 = &mut s;
149149

150-
// add one line below to make a compiler error: cannot borrow `s` as mutable more than once at a time
150+
// 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-
println!("{}, {}", r1, r2);
152+
println!("{}", r1);
153153
}
154154
```

0 commit comments

Comments
 (0)