From 50a428e2ad1262eefdfe02feb2bae0854d22616c Mon Sep 17 00:00:00 2001 From: Nic0w Date: Mon, 26 Apr 2021 21:25:52 +0200 Subject: [PATCH] Error needs to derive Debug if we want to unwrap. --- rp2040-hal/src/uart.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rp2040-hal/src/uart.rs b/rp2040-hal/src/uart.rs index d9c1759..a51c4d2 100644 --- a/rp2040-hal/src/uart.rs +++ b/rp2040-hal/src/uart.rs @@ -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 UARTPeripheral { w.data().bits(*c); w }); - + bytes_written += 1; } return Ok(&data[bytes_written..])