use crate::DropGuarded; pub struct ArbitraryDropGuard ()>(Option); impl ()> ArbitraryDropGuard { #[inline] pub const fn new(f: F) -> Self { Self(Some(f)) } } impl ()> DropGuarded for ArbitraryDropGuard { fn cancel(mut self) { if let Some(f) = self.0.take() { f(); } } }