diff --git a/apps/system/components/DebugConsole/kata-io/src/lib.rs b/apps/system/components/DebugConsole/kata-io/src/lib.rs index 5eb7877..9ca92d3 100644 --- a/apps/system/components/DebugConsole/kata-io/src/lib.rs +++ b/apps/system/components/DebugConsole/kata-io/src/lib.rs @@ -2,14 +2,16 @@ pub struct Error; +pub type Result = core::result::Result; + /// Interface for the CLI to consume bytes. pub trait Read { - fn read(&mut self, buf: &mut [u8]) -> Result; + fn read(&mut self, buf: &mut [u8]) -> Result; } /// Interface for the CLI to emit bytes. pub trait Write { - fn write(&mut self, buf: &[u8]) -> Result; + fn write(&mut self, buf: &[u8]) -> Result; } /// Adapter for writing core::fmt formatted strings. @@ -24,7 +26,7 @@ impl core::fmt::Write for dyn Write + '_ { } impl dyn Read + '_ { - pub fn get_u8(&mut self) -> Result { + pub fn get_u8(&mut self) -> Result { let mut buf: [u8; 1] = [0u8]; let n_read = self.read(&mut buf)?; match n_read {