File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ fn main() {
28
28
borrowed_point.x, another_borrow.y, point.z);
29
29
30
30
// The immutable references are no longer used for the rest of the code so
31
- // it is possible to reborrow with a mutbale reference.
31
+ // it is possible to reborrow with a mutable reference.
32
32
let mutable_borrow = &mut point;
33
33
34
34
// Change data via mutable reference
@@ -50,9 +50,7 @@ fn main() {
50
50
mutable_borrow.x, mutable_borrow.y, mutable_borrow.z);
51
51
52
52
// The mutable reference is no longer used for the rest of the code so it
53
- // is possible to reborrow.
54
-
55
- // Immutable references to `point` are allowed again
53
+ // is possible to reborrow
56
54
let new_borrowed_point = &point;
57
55
println!("Point now has coordinates: ({}, {}, {})",
58
56
new_borrowed_point.x, new_borrowed_point.y, new_borrowed_point.z);
You can’t perform that action at this time.
0 commit comments