Skip to content

Commit

Permalink
Mark State/Info as #[non_exhaustive]
Browse files Browse the repository at this point in the history
  • Loading branch information
bugadani committed Nov 6, 2024
1 parent 4c5be2c commit 3dbca36
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions esp-hal/src/spi/master.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
///
Expand Down
2 changes: 2 additions & 0 deletions esp-hal/src/uart.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2174,6 +2174,7 @@ pub trait Instance: Peripheral<P = Self> + PeripheralMarker + Into<AnyUart> + 's
}

/// Peripheral data describing a particular UART instance.
#[non_exhaustive]
pub struct Info {
/// Pointer to the register block for this UART instance.
///
Expand All @@ -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,
Expand Down

0 comments on commit 3dbca36

Please sign in to comment.