diff options
| author | Dario Nieuwenhuis <[email protected]> | 2022-08-28 21:15:07 +0200 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2022-08-28 21:15:07 +0200 |
| commit | 1ee2dfa03e6d3578ffaac810b49b726e7da9cf36 (patch) | |
| tree | 5e180a19e6ec254111d25397998169c89e6d6a63 /embassy-futures/src/select.rs | |
| parent | 24ab21a7ddcf8dafd6f464e6d66c9011cc08047b (diff) | |
futures: derive defmt for Eithers
Diffstat (limited to 'embassy-futures/src/select.rs')
| -rw-r--r-- | embassy-futures/src/select.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/embassy-futures/src/select.rs b/embassy-futures/src/select.rs index 8cecb7fa0..53fa1da61 100644 --- a/embassy-futures/src/select.rs +++ b/embassy-futures/src/select.rs | |||
| @@ -4,6 +4,7 @@ use core::task::{Context, Poll}; | |||
| 4 | 4 | ||
| 5 | /// Result for [`select`]. | 5 | /// Result for [`select`]. |
| 6 | #[derive(Debug, Clone)] | 6 | #[derive(Debug, Clone)] |
| 7 | #[cfg_attr(feature = "defmt", derive(defmt::Format))] | ||
| 7 | pub enum Either<A, B> { | 8 | pub enum Either<A, B> { |
| 8 | /// First future finished first. | 9 | /// First future finished first. |
| 9 | First(A), | 10 | First(A), |
| @@ -60,6 +61,7 @@ where | |||
| 60 | 61 | ||
| 61 | /// Result for [`select3`]. | 62 | /// Result for [`select3`]. |
| 62 | #[derive(Debug, Clone)] | 63 | #[derive(Debug, Clone)] |
| 64 | #[cfg_attr(feature = "defmt", derive(defmt::Format))] | ||
| 63 | pub enum Either3<A, B, C> { | 65 | pub enum Either3<A, B, C> { |
| 64 | /// First future finished first. | 66 | /// First future finished first. |
| 65 | First(A), | 67 | First(A), |
| @@ -118,6 +120,7 @@ where | |||
| 118 | 120 | ||
| 119 | /// Result for [`select4`]. | 121 | /// Result for [`select4`]. |
| 120 | #[derive(Debug, Clone)] | 122 | #[derive(Debug, Clone)] |
| 123 | #[cfg_attr(feature = "defmt", derive(defmt::Format))] | ||
| 121 | pub enum Either4<A, B, C, D> { | 124 | pub enum Either4<A, B, C, D> { |
| 122 | /// First future finished first. | 125 | /// First future finished first. |
| 123 | First(A), | 126 | First(A), |
