From 693465386bbcdc25a360dd6a598010d18ce6cb1a Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sat, 6 Jul 2019 12:47:33 -0400 Subject: ensure!(false, ...) isn't necessary --- src/readline.rs | 4 ++-- 1 file 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(); } } } -- cgit v1.2.3-54-g00ecf