Error needs to derive Debug if we want to unwrap.

This commit is contained in:
Nic0w 2021-04-26 21:25:52 +02:00
parent 920d0dc897
commit 50a428e2ad

View file

@ -19,6 +19,7 @@ use crate::pac::{
};
/// Error type for UART operations.
#[derive(Debug)]
pub enum Error {
/// Bad argument : when things overflow, ...
BadArgument
@ -234,7 +235,7 @@ impl<D: UARTDevice> UARTPeripheral<Enabled, D> {
w.data().bits(*c);
w
});
bytes_written += 1;
}
return Ok(&data[bytes_written..])