diff options
author | Jesse Luehrs <doy@tozt.net> | 2019-07-06 12:47:33 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2019-07-06 12:47:33 -0400 |
commit | 693465386bbcdc25a360dd6a598010d18ce6cb1a (patch) | |
tree | 7a5f135f1ebc1db011971086899868f6aaeb6c3e | |
parent | c87eba973da4b756ee8011c0b997ae9b95372933 (diff) | |
download | nbsh-old-693465386bbcdc25a360dd6a598010d18ce6cb1a.tar.gz nbsh-old-693465386bbcdc25a360dd6a598010d18ce6cb1a.zip |
ensure!(false, ...) isn't necessary
-rw-r--r-- | src/readline.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/readline.rs b/src/readline.rs index 6d1a69a..d385bd1 100644 --- a/src/readline.rs +++ b/src/readline.rs @@ -126,7 +126,7 @@ impl ReadlineState { 'd' => { if self.buffer.is_empty() { self.echo_char('\n').context(WriteToTerminal)?; - snafu::ensure!(false, EOF); + return EOF.fail(); } } 'e' => { @@ -256,7 +256,7 @@ impl futures::future::Future for Readline { } Err(std::sync::mpsc::TryRecvError::Disconnected) => { // is EOF correct here? - snafu::ensure!(false, EOF) + return EOF.fail(); } } } |