diff options
-rw-r--r-- | src/errors.rs | 2 | ||||
-rw-r--r-- | src/lib.rs | 10 | ||||
-rw-r--r-- | src/tty.rs | 8 |
3 files changed, 10 insertions, 10 deletions
diff --git a/src/errors.rs b/src/errors.rs index 3c9e459..85e46b8 100644 --- a/src/errors.rs +++ b/src/errors.rs @@ -79,7 +79,7 @@ impl StdError for Error { } } - fn cause(&self) -> Option<&StdError> { + fn cause(&self) -> Option<&dyn StdError> { match self { Error::SerdeJsonError(ref err) => Some(err), Error::Http(ref err) => Some(err), @@ -167,9 +167,9 @@ impl<'a> Images<'a> { .map_err(Error::from) }) .flatten(), - ) as Box<Stream<Item = Value, Error = Error> + Send>, + ) as Box<dyn Stream<Item = Value, Error = Error> + Send>, Err(e) => Box::new(futures::future::err(Error::IO(e)).into_stream()) - as Box<Stream<Item = Value, Error = Error> + Send>, + as Box<dyn Stream<Item = Value, Error = Error> + Send>, } } @@ -250,7 +250,7 @@ impl<'a> Images<'a> { /// source can be uncompressed on compressed via gzip, bzip2 or xz pub fn import( self, - mut tarball: Box<Read>, + mut tarball: Box<dyn Read>, ) -> impl Stream<Item = Value, Error = Error> { let mut bytes = Vec::new(); @@ -267,9 +267,9 @@ impl<'a> Images<'a> { .map_err(Error::from) .into_future() }), - ) as Box<Stream<Item = Value, Error = Error> + Send>, + ) as Box<dyn Stream<Item = Value, Error = Error> + Send>, Err(e) => Box::new(futures::future::err(Error::IO(e)).into_stream()) - as Box<Stream<Item = Value, Error = Error> + Send>, + as Box<dyn Stream<Item = Value, Error = Error> + Send>, } } } @@ -23,13 +23,13 @@ pub enum StreamType { /// A multiplexed stream. pub struct Multiplexed { - stdin: Box<AsyncWrite>, - chunks: Box<futures::Stream<Item = Chunk, Error = crate::Error>>, + stdin: Box<dyn AsyncWrite>, + chunks: Box<dyn futures::Stream<Item = Chunk, Error = crate::Error>>, } pub struct MultiplexedBlocking { - stdin: Box<AsyncWrite>, - chunks: Box<Iterator<Item = Result<Chunk, crate::Error>>>, + stdin: Box<dyn AsyncWrite>, + chunks: Box<dyn Iterator<Item = Result<Chunk, crate::Error>>>, } /// Represent the current state of the decoding of a TTY frame |