mirror of
https://github.com/orhun/systeroid
synced 2024-10-04 14:39:06 +00:00
fix(lint): apply clippy suggestions
This commit is contained in:
parent
c39169c5f5
commit
94d369cf82
|
@ -1 +0,0 @@
|
|||
msrv = "1.56.1"
|
|
@ -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,
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue