Skip to content

Commit

Permalink
typos
Browse files Browse the repository at this point in the history
  • Loading branch information
andymac-2 committed Oct 4, 2019
1 parent d5b61ef commit 6b8d6ae
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/scope/borrow/alias.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ fn main() {
borrowed_point.x, another_borrow.y, point.z);
// The immutable references are no longer used for the rest of the code so
// it is possible to reborrow with a mutbale reference.
// it is possible to reborrow with a mutable reference.
let mutable_borrow = &mut point;
// Change data via mutable reference
Expand All @@ -50,9 +50,7 @@ fn main() {
mutable_borrow.x, mutable_borrow.y, mutable_borrow.z);
// The mutable reference is no longer used for the rest of the code so it
// is possible to reborrow.
// Immutable references to `point` are allowed again
// is possible to reborrow
let new_borrowed_point = &point;
println!("Point now has coordinates: ({}, {}, {})",
new_borrowed_point.x, new_borrowed_point.y, new_borrowed_point.z);
Expand Down

0 comments on commit 6b8d6ae

Please sign in to comment.