From cb3f0a404cf9fcf07725caf32ede5cc46185e0bf Mon Sep 17 00:00:00 2001 From: mwojcik Date: Thu, 26 Aug 2021 14:59:04 +0200 Subject: [PATCH] libio: read/write traits from libio not core_io --- src/libio/cursor.rs | 4 ++-- src/libio/proto.rs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/libio/cursor.rs b/src/libio/cursor.rs index b820bddd..174a2875 100644 --- a/src/libio/cursor.rs +++ b/src/libio/cursor.rs @@ -1,4 +1,4 @@ -use {Read, Write}; +use ::{Read, Write}; #[derive(Debug, Clone)] pub struct Cursor { @@ -50,7 +50,7 @@ impl> Read for Cursor { } } -impl<'a> Write for Cursor<&'a mut [u8]> { +impl Write for Cursor<&mut [u8]> { type WriteError = !; type FlushError = !; diff --git a/src/libio/proto.rs b/src/libio/proto.rs index c165606b..8ecf2157 100644 --- a/src/libio/proto.rs +++ b/src/libio/proto.rs @@ -3,7 +3,7 @@ use byteorder::{ByteOrder, NativeEndian}; use alloc::vec; use alloc::string::String; -use core_io::{Read, Write, Error as IoError}; +use ::{Read, Write, Error as IoError}; #[allow(dead_code)] #[derive(Debug, Clone, PartialEq)] @@ -142,7 +142,7 @@ pub trait ProtoWrite { } impl ProtoRead for T where T: Read + ?Sized { - type ReadError = IoError; + type ReadError = IoError; fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), Self::ReadError> { T::read_exact(self, buf) @@ -150,7 +150,7 @@ impl ProtoRead for T where T: Read + ?Sized { } impl ProtoWrite for T where T: Write + ?Sized { - type WriteError = IoError; + type WriteError = IoError; fn write_all(&mut self, buf: &[u8]) -> Result<(), Self::WriteError> { T::write_all(self, buf)