fix(lint): apply clippy suggestions

This commit is contained in:
Orhun Parmaksız 2022-08-04 02:17:08 +02:00
parent c39169c5f5
commit 94d369cf82
No known key found for this signature in database
GPG key ID: F83424824B3E4B90
4 changed files with 4 additions and 4 deletions

View file

@ -1 +0,0 @@
msrv = "1.56.1"

View file

@ -3,7 +3,7 @@ use std::str::FromStr;
use termion::event::Key;
/// Possible application commands.
#[derive(Debug, PartialEq)]
#[derive(Debug, PartialEq, Eq)]
pub enum Command {
/// Show help.
Help,

View file

@ -5,7 +5,7 @@ macro_rules! generate_option {
$($variant: ident => $str_repr: expr,)+
) => {
/// Available options.
#[derive(Clone, Copy, Debug, PartialEq)]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum $name {
$(
/// Option.

View file

@ -172,7 +172,8 @@ impl<'a, Output: Write> App<'a, Output> {
/// Processes the parameters in the given file.
pub fn preload_from_file(&mut self, path: PathBuf) -> Result<()> {
if path == PathBuf::from("-") {
for line in io::stdin().lock().lines() {
let lines = io::stdin().lock().lines();
for line in lines {
if let Err(e) = self.process_parameter(line?, true, false) {
println!("{}: {}", env!("CARGO_PKG_NAME"), e);
}