aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2019-07-06 12:47:33 -0400
committerJesse Luehrs <doy@tozt.net>2019-07-06 12:47:33 -0400
commit693465386bbcdc25a360dd6a598010d18ce6cb1a (patch)
tree7a5f135f1ebc1db011971086899868f6aaeb6c3e
parentc87eba973da4b756ee8011c0b997ae9b95372933 (diff)
downloadnbsh-old-693465386bbcdc25a360dd6a598010d18ce6cb1a.tar.gz
nbsh-old-693465386bbcdc25a360dd6a598010d18ce6cb1a.zip
ensure!(false, ...) isn't necessary
-rw-r--r--src/readline.rs4
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();
}
}
}