summaryrefslogtreecommitdiffstats
path: root/src/tty.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tty.rs')
-rw-r--r--src/tty.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/tty.rs b/src/tty.rs
index 038fde0..603c821 100644
--- a/src/tty.rs
+++ b/src/tty.rs
@@ -70,6 +70,12 @@ impl TtyDecoder {
}
}
+impl Default for TtyDecoder {
+ fn default() -> Self {
+ Self::new()
+ }
+}
+
impl Decoder for TtyDecoder {
type Item = Chunk;
type Error = Error;
@@ -226,7 +232,7 @@ where
});
util::stop_on_err(stream, |e| e.kind() != io::ErrorKind::UnexpectedEof)
- .map_err(|e| crate::Error::from(e))
+ .map_err(crate::Error::from)
}
mod util {