From 26c57dc95732d1454bbda8393559fda705e5efb0 Mon Sep 17 00:00:00 2001 From: mrg Date: Wed, 18 Sep 2024 11:22:56 +0200 Subject: [PATCH] add custom drop trait docs link --- training-slides/src/ownership.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/training-slides/src/ownership.md b/training-slides/src/ownership.md index a1ab7d7..a9693e8 100644 --- a/training-slides/src/ownership.md +++ b/training-slides/src/ownership.md @@ -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: