Skip to content

Commit

Permalink
Merge pull request #199 from ferrous-systems/drop-trait-extension
Browse files Browse the repository at this point in the history
add custom drop trait docs link
  • Loading branch information
jonathanpallant authored Sep 18, 2024
2 parents e909ddb + 26c57dc commit f587901
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion training-slides/src/ownership.md
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ We call this *dropping* the value.

## Custom Cleaning

You can define a specific behaviour to happen on *drop* using the *Drop* trait.
You can define a specific behaviour to happen on *drop* using the *Drop* trait (cf. [std::ops::Drop](https://doc.rust-lang.org/stable/std/ops/trait.Drop.html)).

For example, the memory used by a `String` is freed when dropped:

Expand Down

0 comments on commit f587901

Please sign in to comment.