Skip to content

Commit b1a5966

Browse files
committed
Don't allow unreachable_patterns
The warning happening in beta will be rolled back (for now) according to rust-lang/rust#129352 (comment) Until this change propagates to a beta release, we can live with the warnings.
1 parent fb6b977 commit b1a5966

File tree

4 files changed

+0
-6
lines changed

4 files changed

+0
-6
lines changed

rp2040-hal/src/uart/peripheral.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,6 @@ impl<D: UartDevice, P: ValidUartPinout<D>> Write<u8> for UartPeripheral<Enabled,
449449
}
450450

451451
fn flush(&mut self) -> nb::Result<(), Self::Error> {
452-
#[allow(unreachable_patterns)]
453452
super::writer::transmit_flushed(&self.device).map_err(|e| match e {
454453
WouldBlock => WouldBlock,
455454
Other(v) => match v {},

rp2040-hal/src/uart/writer.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ pub(crate) fn write_raw<'d>(
8787
pub(crate) fn write_full_blocking(rb: &RegisterBlock, data: &[u8]) {
8888
let mut temp = data;
8989

90-
#[allow(unreachable_patterns)]
9190
while !temp.is_empty() {
9291
temp = match write_raw(rb, temp) {
9392
Ok(remaining) => remaining,
@@ -280,7 +279,6 @@ impl<D: UartDevice, P: ValidUartPinout<D>> Write<u8> for Writer<D, P> {
280279
}
281280

282281
fn flush(&mut self) -> nb::Result<(), Self::Error> {
283-
#[allow(unreachable_patterns)]
284282
transmit_flushed(&self.device).map_err(|e| match e {
285283
WouldBlock => WouldBlock,
286284
Other(v) => match v {},

rp235x-hal/src/uart/peripheral.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,6 @@ impl<D: UartDevice, P: ValidUartPinout<D>> Write<u8> for UartPeripheral<Enabled,
449449
}
450450

451451
fn flush(&mut self) -> nb::Result<(), Self::Error> {
452-
#[allow(unreachable_patterns)]
453452
super::writer::transmit_flushed(&self.device).map_err(|e| match e {
454453
WouldBlock => WouldBlock,
455454
Other(v) => match v {},

rp235x-hal/src/uart/writer.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ pub(crate) fn write_raw<'d>(
8787
pub(crate) fn write_full_blocking(rb: &RegisterBlock, data: &[u8]) {
8888
let mut temp = data;
8989

90-
#[allow(unreachable_patterns)]
9190
while !temp.is_empty() {
9291
temp = match write_raw(rb, temp) {
9392
Ok(remaining) => remaining,
@@ -281,7 +280,6 @@ impl<D: UartDevice, P: ValidUartPinout<D>> Write<u8> for Writer<D, P> {
281280
}
282281

283282
fn flush(&mut self) -> nb::Result<(), Self::Error> {
284-
#[allow(unreachable_patterns)]
285283
transmit_flushed(&self.device).map_err(|e| match e {
286284
WouldBlock => WouldBlock,
287285
Other(v) => match v {},

0 commit comments

Comments
 (0)