Skip to content

Commit 66e9f74

Browse files
committed
Fix the dropping example more
1 parent 79a466c commit 66e9f74

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

text/0000-manually-drop.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ impl Drop for FruitBox {
112112
// Explicit ordering in which field destructors are run specified in the intuitive
113113
// location – the destructor of the structure containing the fields.
114114
// Moreover, one can now reorder fields within the struct however much they want.
115-
peach.drop();
116-
banana.drop();
115+
ManuallyDrop::drop(&mut self.peach);
116+
ManuallyDrop::drop(&mut self.banana);
117117
}
118118
// After destructor for `FruitBox` runs (this function), the destructor for Melon gets
119119
// invoked in the usual manner, as it is not wrapped in `ManuallyDrop`.

0 commit comments

Comments
 (0)