From 98595f659c309703aab411b6b3be7579b6e93c5d Mon Sep 17 00:00:00 2001 From: Ralph Ursprung Date: Mon, 28 Jul 2025 15:37:34 +0200 Subject: `embassy-time`: add missing `Debug` & `defmt::Format` derives `defmt::Format` is *not* implemented for `MockDriver` and `InnerMockDriver` because the former contains the latter and the latter is using `Queue` from `embassy-time-queue-utils` which so far does not have a `defmt` dependency. since this is just a mock driver it shouldn't be relevant if it has no `defmt::Format` impl. --- embassy-time/src/timer.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'embassy-time/src/timer.rs') diff --git a/embassy-time/src/timer.rs b/embassy-time/src/timer.rs index d3f1e1621..54bb9b6d8 100644 --- a/embassy-time/src/timer.rs +++ b/embassy-time/src/timer.rs @@ -66,6 +66,8 @@ impl WithTimeout for F { /// Future for the [`with_timeout`] and [`with_deadline`] functions. #[must_use = "futures do nothing unless you `.await` or poll them"] +#[derive(Debug)] +#[cfg_attr(feature = "defmt", derive(defmt::Format))] pub struct TimeoutFuture { timer: Timer, fut: F, @@ -92,6 +94,8 @@ impl Future for TimeoutFuture { /// A future that completes at a specified [Instant](struct.Instant.html). #[must_use = "futures do nothing unless you `.await` or poll them"] +#[derive(Debug)] +#[cfg_attr(feature = "defmt", derive(defmt::Format))] pub struct Timer { expires_at: Instant, yielded_once: bool, @@ -227,6 +231,8 @@ impl Future for Timer { /// ## Cancel safety /// It is safe to cancel waiting for the next tick, /// meaning no tick is lost if the Future is dropped. +#[derive(Debug)] +#[cfg_attr(feature = "defmt", derive(defmt::Format))] pub struct Ticker { expires_at: Instant, duration: Duration, -- cgit