aboutsummaryrefslogtreecommitdiffstats
path: root/src/readline.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/readline.rs')
-rw-r--r--src/readline.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/readline.rs b/src/readline.rs
index 2077da2..6d1a69a 100644
--- a/src/readline.rs
+++ b/src/readline.rs
@@ -1,7 +1,7 @@
-use snafu::{ensure, ResultExt, Snafu};
-use std::io::Write;
+use snafu::ResultExt as _;
+use std::io::Write as _;
-#[derive(Debug, Snafu)]
+#[derive(Debug, snafu::Snafu)]
pub enum Error {
#[snafu(display("failed to write to the terminal: {}", source))]
WriteToTerminal { source: std::io::Error },
@@ -126,7 +126,7 @@ impl ReadlineState {
'd' => {
if self.buffer.is_empty() {
self.echo_char('\n').context(WriteToTerminal)?;
- ensure!(false, EOF);
+ snafu::ensure!(false, EOF);
}
}
'e' => {
@@ -256,7 +256,7 @@ impl futures::future::Future for Readline {
}
Err(std::sync::mpsc::TryRecvError::Disconnected) => {
// is EOF correct here?
- ensure!(false, EOF)
+ snafu::ensure!(false, EOF)
}
}
}