This commit is contained in:
Zoffix Znet 2016-10-25 10:03:55 -04:00 committed by GitHub
parent affc3b7552
commit 22ce98d0e7
1 changed files with 1 additions and 1 deletions

View File

@ -240,7 +240,7 @@ fn main() {
In other words, the mutable borrow is held through the rest of our example. What
we want is for the mutable borrow by `y` to end so that the resource can be
returned to the owner, `x`. `x` can then provide a immutable borrow to `println!`.
returned to the owner, `x`. `x` can then provide an immutable borrow to `println!`.
In Rust, borrowing is tied to the scope that the borrow is valid for. And our
scopes look like this: