Skip to content

Commit 3f4c8d9

Browse files
committed
io: remove useless crate::.
1 parent 6e8bd14 commit 3f4c8d9

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

embedded-io/src/lib.rs

+11-11
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ pub trait ErrorType {
127127
type Error: Error;
128128
}
129129

130-
impl<T: ?Sized + crate::ErrorType> crate::ErrorType for &mut T {
130+
impl<T: ?Sized + ErrorType> ErrorType for &mut T {
131131
type Error = T::Error;
132132
}
133133

@@ -208,7 +208,7 @@ impl<E: fmt::Debug> std::error::Error for WriteAllError<E> {}
208208
/// Blocking reader.
209209
///
210210
/// This trait is the `embedded-io` equivalent of [`std::io::Read`].
211-
pub trait Read: crate::ErrorType {
211+
pub trait Read: ErrorType {
212212
/// Read some bytes from this source into the specified buffer, returning how many bytes were read.
213213
///
214214
/// If no bytes are currently available to read, this function blocks until at least one byte is available.
@@ -253,7 +253,7 @@ pub trait Read: crate::ErrorType {
253253
/// Blocking buffered reader.
254254
///
255255
/// This trait is the `embedded-io` equivalent of [`std::io::BufRead`].
256-
pub trait BufRead: crate::ErrorType {
256+
pub trait BufRead: ErrorType {
257257
/// Return the contents of the internal buffer, filling it with more data from the inner reader if it is empty.
258258
///
259259
/// If no bytes are currently available to read, this function blocks until at least one byte is available.
@@ -270,7 +270,7 @@ pub trait BufRead: crate::ErrorType {
270270
/// Blocking writer.
271271
///
272272
/// This trait is the `embedded-io` equivalent of [`std::io::Write`].
273-
pub trait Write: crate::ErrorType {
273+
pub trait Write: ErrorType {
274274
/// Write a buffer into this writer, returning how many bytes were written.
275275
///
276276
/// If the writer is not currently ready to accept more bytes (for example, its buffer is full),
@@ -359,27 +359,27 @@ pub trait Write: crate::ErrorType {
359359
/// Blocking seek within streams.
360360
///
361361
/// This trait is the `embedded-io` equivalent of [`std::io::Seek`].
362-
pub trait Seek: crate::ErrorType {
362+
pub trait Seek: ErrorType {
363363
/// Seek to an offset, in bytes, in a stream.
364-
fn seek(&mut self, pos: crate::SeekFrom) -> Result<u64, Self::Error>;
364+
fn seek(&mut self, pos: SeekFrom) -> Result<u64, Self::Error>;
365365

366366
/// Rewind to the beginning of a stream.
367367
fn rewind(&mut self) -> Result<(), Self::Error> {
368-
self.seek(crate::SeekFrom::Start(0))?;
368+
self.seek(SeekFrom::Start(0))?;
369369
Ok(())
370370
}
371371

372372
/// Returns the current seek position from the start of the stream.
373373
fn stream_position(&mut self) -> Result<u64, Self::Error> {
374-
self.seek(crate::SeekFrom::Current(0))
374+
self.seek(SeekFrom::Current(0))
375375
}
376376
}
377377

378378
/// Get whether a reader is ready.
379379
///
380380
/// This allows using a [`Read`] or [`BufRead`] in a nonblocking fashion, i.e. trying to read
381381
/// only when it is ready.
382-
pub trait ReadReady: crate::ErrorType {
382+
pub trait ReadReady: ErrorType {
383383
/// Get whether the reader is ready for immediately reading.
384384
///
385385
/// This usually means that there is either some bytes have been received and are buffered and ready to be read,
@@ -393,7 +393,7 @@ pub trait ReadReady: crate::ErrorType {
393393
///
394394
/// This allows using a [`Write`] in a nonblocking fashion, i.e. trying to write
395395
/// only when it is ready.
396-
pub trait WriteReady: crate::ErrorType {
396+
pub trait WriteReady: ErrorType {
397397
/// Get whether the writer is ready for immediately writing.
398398
///
399399
/// This usually means that there is free space in the internal transmit buffer.
@@ -433,7 +433,7 @@ impl<T: ?Sized + Write> Write for &mut T {
433433

434434
impl<T: ?Sized + Seek> Seek for &mut T {
435435
#[inline]
436-
fn seek(&mut self, pos: crate::SeekFrom) -> Result<u64, Self::Error> {
436+
fn seek(&mut self, pos: SeekFrom) -> Result<u64, Self::Error> {
437437
T::seek(self, pos)
438438
}
439439
}

0 commit comments

Comments
 (0)