@@ -93,7 +93,7 @@ must have a deallocation for each allocation. Rust handles this for you. It
93
93
knows that our handle, ` x ` , is the owning reference to our box. Rust knows that
94
94
` x ` will go out of scope at the end of the block, and so it inserts a call to
95
95
deallocate the memory at the end of the scope. Because the compiler does this
96
- for us, it's impossible to forget. We always exaclty one deallocations paired
96
+ for us, it's impossible to forget. We always have exactly one deallocation paired
97
97
with each of our allocations.
98
98
99
99
This is pretty straightforward, but what happens when we want to pass our box
@@ -186,11 +186,11 @@ This function takes ownership, because it takes a `Box`, which owns its
186
186
contents. But then we give ownership right back.
187
187
188
188
In the physical world, you can give one of your possessions to someone for a
189
- short period of time. You still own your posession , you're just letting someone
189
+ short period of time. You still own your possession , you're just letting someone
190
190
else use it for a while. We call that 'lending' something to someone, and that
191
191
person is said to be 'borrowing' that something from you.
192
192
193
- Rust's ownershp system also allows an owner to lend out a handle for a limited
193
+ Rust's ownership system also allows an owner to lend out a handle for a limited
194
194
period. This is also called 'borrowing.' Here's a version of ` add_one ` which
195
195
borrows its argument rather than taking ownership:
196
196
0 commit comments