1
0
forked from ROMEO/nexosim

Mark EventKey as must_use

This commit is contained in:
Serge Barral 2023-08-15 16:07:17 +02:00
parent e31597b14d
commit f6808adaf9

View File

@ -429,6 +429,7 @@ impl<M: Model> fmt::Debug for Scheduler<M> {
/// ///
/// An `EventKey` can be used to cancel a future event. /// An `EventKey` can be used to cancel a future event.
#[derive(Clone, Debug)] #[derive(Clone, Debug)]
#[must_use = "prefer unkeyed scheduling methods if the event is never cancelled"]
pub struct EventKey { pub struct EventKey {
is_cancelled: Arc<AtomicBool>, is_cancelled: Arc<AtomicBool>,
} }