Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/pr/2495'
Browse files Browse the repository at this point in the history
  • Loading branch information
carols10cents committed Dec 23, 2020
2 parents b7ad637 + 1977161 commit cf1c3d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ch04-01-what-is-ownership.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ from Listing 4-1 using a `String` instead of a string literal:

There is a natural point at which we can return the memory our `String` needs
to the allocator: when `s` goes out of scope. When a variable goes out
of scope, Rust calls a special function for us. This function is called `drop`,
of scope, Rust calls a special function for us. This function is called [`drop`](https://doc.rust-lang.org/std/ops/trait.Drop.html#tymethod.drop),
and it’s where the author of `String` can put the code to return the memory.
Rust calls `drop` automatically at the closing curly bracket.

Expand Down

0 comments on commit cf1c3d3

Please sign in to comment.