Skip to content

Commit

Permalink
Merge pull request #683 from gwenn/clean
Browse files Browse the repository at this point in the history
Unnecessarily qualified path
  • Loading branch information
gwenn authored Feb 19, 2023
2 parents 0384654 + 0c1eeb6 commit 2c9e911
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<T> = result::Result<T, error::ReadlineError>;
pub type Result<T> = result::Result<T, ReadlineError>;

/// Completes the line/word
fn complete_line<H: Helper>(
Expand Down Expand Up @@ -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');
Expand Down Expand Up @@ -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),
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/tty/unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 2c9e911

Please sign in to comment.