From 0c1eeb67f42e620acdd420935b16a844e3ef58b9 Mon Sep 17 00:00:00 2001 From: gwenn Date: Sun, 19 Feb 2023 14:16:21 +0100 Subject: [PATCH] Unnecessarily qualified path --- src/lib.rs | 6 +++--- src/tty/unix.rs | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 72a8dc9c7..03f2446fb 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -71,7 +71,7 @@ pub use crate::undo::Changeset; use crate::validate::Validator; /// The error type for I/O and Linux Syscalls (Errno) -pub type Result = result::Result; +pub type Result = result::Result; /// Completes the line/word fn complete_line( @@ -489,7 +489,7 @@ fn readline_direct( loop { if reader.read_line(&mut input)? == 0 { - return Err(error::ReadlineError::Eof); + return Err(ReadlineError::Eof); } // Remove trailing newline let trailing_n = input.ends_with('\n'); @@ -954,7 +954,7 @@ impl<'a, H: Helper, I: History> Iterator for Iter<'a, H, I> { let readline = self.editor.readline(self.prompt); match readline { Ok(l) => Some(Ok(l)), - Err(error::ReadlineError::Eof) => None, + Err(ReadlineError::Eof) => None, e @ Err(_) => Some(e), } } diff --git a/src/tty/unix.rs b/src/tty/unix.rs index 8504d6a25..23bfccea8 100644 --- a/src/tty/unix.rs +++ b/src/tty/unix.rs @@ -801,12 +801,12 @@ impl RawReader for PosixRawReader { loop { let n = self.tty_in.read(&mut buf)?; if n == 0 { - return Err(error::ReadlineError::Eof); + return Err(ReadlineError::Eof); } let b = buf[0]; self.parser.advance(&mut receiver, b); if !receiver.valid { - return Err(error::ReadlineError::from(ErrorKind::InvalidData)); + return Err(ReadlineError::from(ErrorKind::InvalidData)); } else if let Some(c) = receiver.c.take() { return Ok(c); }