diff options
author | Jesse Luehrs <doy@tozt.net> | 2019-07-06 12:32:12 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2019-07-06 12:37:57 -0400 |
commit | c87eba973da4b756ee8011c0b997ae9b95372933 (patch) | |
tree | ca5c8a416769202ac353b7d327ff6150da104a5a /src/readline.rs | |
parent | f6340bebd450d7ad166ac57b3618579f614c9f0c (diff) | |
download | nbsh-old-c87eba973da4b756ee8011c0b997ae9b95372933.tar.gz nbsh-old-c87eba973da4b756ee8011c0b997ae9b95372933.zip |
there's no reason to import these by name
Diffstat (limited to 'src/readline.rs')
-rw-r--r-- | src/readline.rs | 10 |
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) } } } |