diff options
| -rw-r--r-- | embassy-hal-common/src/drop.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/embassy-hal-common/src/drop.rs b/embassy-hal-common/src/drop.rs index 6ef716f99..7cd16aaec 100644 --- a/embassy-hal-common/src/drop.rs +++ b/embassy-hal-common/src/drop.rs | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | use core::mem; | 1 | use core::mem; |
| 2 | use core::mem::MaybeUninit; | 2 | use core::mem::MaybeUninit; |
| 3 | 3 | ||
| 4 | #[must_use = "to delay the drop handler invokation to the end of the scope"] | ||
| 4 | pub struct OnDrop<F: FnOnce()> { | 5 | pub struct OnDrop<F: FnOnce()> { |
| 5 | f: MaybeUninit<F>, | 6 | f: MaybeUninit<F>, |
| 6 | } | 7 | } |
| @@ -27,6 +28,7 @@ impl<F: FnOnce()> Drop for OnDrop<F> { | |||
| 27 | /// | 28 | /// |
| 28 | /// To correctly dispose of this device, call the [defuse](struct.DropBomb.html#method.defuse) | 29 | /// To correctly dispose of this device, call the [defuse](struct.DropBomb.html#method.defuse) |
| 29 | /// method before this object is dropped. | 30 | /// method before this object is dropped. |
| 31 | #[must_use = "to delay the drop bomb invokation to the end of the scope"] | ||
| 30 | pub struct DropBomb { | 32 | pub struct DropBomb { |
| 31 | _private: (), | 33 | _private: (), |
| 32 | } | 34 | } |
