From f10534b3179dcbc2667b1c6aed3039a5f3a40f0f Mon Sep 17 00:00:00 2001 From: Atul Bhosale Date: Sun, 15 Sep 2019 21:37:41 +0700 Subject: Use 'dyn' since trait objects without an explicit 'dyn' are deprecated (#194) --- src/errors.rs | 2 +- src/lib.rs | 10 +++++----- 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), diff --git a/src/lib.rs b/src/lib.rs index 061b431..e8f9e95 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -167,9 +167,9 @@ impl<'a> Images<'a> { .map_err(Error::from) }) .flatten(), - ) as Box + Send>, + ) as Box + Send>, Err(e) => Box::new(futures::future::err(Error::IO(e)).into_stream()) - as Box + Send>, + as Box + 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, + mut tarball: Box, ) -> impl Stream { let mut bytes = Vec::new(); @@ -267,9 +267,9 @@ impl<'a> Images<'a> { .map_err(Error::from) .into_future() }), - ) as Box + Send>, + ) as Box + Send>, Err(e) => Box::new(futures::future::err(Error::IO(e)).into_stream()) - as Box + Send>, + as Box + Send>, } } } diff --git a/src/tty.rs b/src/tty.rs index 603c821..a4ab27f 100644 --- a/src/tty.rs +++ b/src/tty.rs @@ -23,13 +23,13 @@ pub enum StreamType { /// A multiplexed stream. pub struct Multiplexed { - stdin: Box, - chunks: Box>, + stdin: Box, + chunks: Box>, } pub struct MultiplexedBlocking { - stdin: Box, - chunks: Box>>, + stdin: Box, + chunks: Box>>, } /// Represent the current state of the decoding of a TTY frame -- cgit v1.2.3