@@ -127,7 +127,7 @@ pub trait ErrorType {
127
127
type Error : Error ;
128
128
}
129
129
130
- impl < T : ?Sized + crate :: ErrorType > crate :: ErrorType for & mut T {
130
+ impl < T : ?Sized + ErrorType > ErrorType for & mut T {
131
131
type Error = T :: Error ;
132
132
}
133
133
@@ -208,7 +208,7 @@ impl<E: fmt::Debug> std::error::Error for WriteAllError<E> {}
208
208
/// Blocking reader.
209
209
///
210
210
/// This trait is the `embedded-io` equivalent of [`std::io::Read`].
211
- pub trait Read : crate :: ErrorType {
211
+ pub trait Read : ErrorType {
212
212
/// Read some bytes from this source into the specified buffer, returning how many bytes were read.
213
213
///
214
214
/// 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 {
253
253
/// Blocking buffered reader.
254
254
///
255
255
/// This trait is the `embedded-io` equivalent of [`std::io::BufRead`].
256
- pub trait BufRead : crate :: ErrorType {
256
+ pub trait BufRead : ErrorType {
257
257
/// Return the contents of the internal buffer, filling it with more data from the inner reader if it is empty.
258
258
///
259
259
/// 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 {
270
270
/// Blocking writer.
271
271
///
272
272
/// This trait is the `embedded-io` equivalent of [`std::io::Write`].
273
- pub trait Write : crate :: ErrorType {
273
+ pub trait Write : ErrorType {
274
274
/// Write a buffer into this writer, returning how many bytes were written.
275
275
///
276
276
/// 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 {
359
359
/// Blocking seek within streams.
360
360
///
361
361
/// This trait is the `embedded-io` equivalent of [`std::io::Seek`].
362
- pub trait Seek : crate :: ErrorType {
362
+ pub trait Seek : ErrorType {
363
363
/// 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 > ;
365
365
366
366
/// Rewind to the beginning of a stream.
367
367
fn rewind ( & mut self ) -> Result < ( ) , Self :: Error > {
368
- self . seek ( crate :: SeekFrom :: Start ( 0 ) ) ?;
368
+ self . seek ( SeekFrom :: Start ( 0 ) ) ?;
369
369
Ok ( ( ) )
370
370
}
371
371
372
372
/// Returns the current seek position from the start of the stream.
373
373
fn stream_position ( & mut self ) -> Result < u64 , Self :: Error > {
374
- self . seek ( crate :: SeekFrom :: Current ( 0 ) )
374
+ self . seek ( SeekFrom :: Current ( 0 ) )
375
375
}
376
376
}
377
377
378
378
/// Get whether a reader is ready.
379
379
///
380
380
/// This allows using a [`Read`] or [`BufRead`] in a nonblocking fashion, i.e. trying to read
381
381
/// only when it is ready.
382
- pub trait ReadReady : crate :: ErrorType {
382
+ pub trait ReadReady : ErrorType {
383
383
/// Get whether the reader is ready for immediately reading.
384
384
///
385
385
/// 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 {
393
393
///
394
394
/// This allows using a [`Write`] in a nonblocking fashion, i.e. trying to write
395
395
/// only when it is ready.
396
- pub trait WriteReady : crate :: ErrorType {
396
+ pub trait WriteReady : ErrorType {
397
397
/// Get whether the writer is ready for immediately writing.
398
398
///
399
399
/// 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 {
433
433
434
434
impl < T : ?Sized + Seek > Seek for & mut T {
435
435
#[ inline]
436
- fn seek ( & mut self , pos : crate :: SeekFrom ) -> Result < u64 , Self :: Error > {
436
+ fn seek ( & mut self , pos : SeekFrom ) -> Result < u64 , Self :: Error > {
437
437
T :: seek ( self , pos)
438
438
}
439
439
}
0 commit comments