Skip to content

Commit

Permalink
Merge pull request #580 from gwenn/clippy
Browse files Browse the repository at this point in the history
Fix clippy warnings
  • Loading branch information
gwenn authored Dec 11, 2021
2 parents 71cba36 + a951dd2 commit 4ff19c0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/edit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ impl<'out, 'prompt, H: Helper> Refresher for State<'out, 'prompt, H> {
}

fn hint_text(&self) -> Option<&str> {
self.hint.as_ref().map(|hint| hint.completion()).flatten()
self.hint.as_ref().and_then(|hint| hint.completion())
}

fn line(&self) -> &str {
Expand Down
2 changes: 1 addition & 1 deletion src/tty/unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ impl RawReader for PosixRawReader {
};
}
let buffer = buffer.replace("\r\n", "\n");
let buffer = buffer.replace("\r", "\n");
let buffer = buffer.replace('\r', "\n");
Ok(buffer)
}

Expand Down

0 comments on commit 4ff19c0

Please sign in to comment.