From 3dbca362f948c99d82ec143f32d25b545e74b9ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1niel=20Buga?= Date: Wed, 6 Nov 2024 19:24:16 +0100 Subject: [PATCH] Mark State/Info as #[non_exhaustive] --- esp-hal/src/spi/master.rs | 1 + esp-hal/src/uart.rs | 2 ++ 2 files changed, 3 insertions(+) diff --git a/esp-hal/src/spi/master.rs b/esp-hal/src/spi/master.rs index 141a348a83..6720f6d908 100644 --- a/esp-hal/src/spi/master.rs +++ b/esp-hal/src/spi/master.rs @@ -2165,6 +2165,7 @@ pub trait Instance: pub trait QspiInstance: Instance {} /// Peripheral data describing a particular SPI instance. +#[non_exhaustive] pub struct Info { /// Pointer to the register block for this SPI instance. /// diff --git a/esp-hal/src/uart.rs b/esp-hal/src/uart.rs index 812b4abd13..142c2f8c9b 100644 --- a/esp-hal/src/uart.rs +++ b/esp-hal/src/uart.rs @@ -2174,6 +2174,7 @@ pub trait Instance: Peripheral

+ PeripheralMarker + Into + 's } /// Peripheral data describing a particular UART instance. +#[non_exhaustive] pub struct Info { /// Pointer to the register block for this UART instance. /// @@ -2200,6 +2201,7 @@ pub struct Info { } /// Peripheral state for a UART instance. +#[non_exhaustive] pub struct State { /// Waker for the asynchronous RX operations. pub rx_waker: AtomicWaker,