summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsitkevij <1553398+sitkevij@users.noreply.github.com>2020-11-07 20:01:30 -0800
committersitkevij <1553398+sitkevij@users.noreply.github.com>2020-11-07 20:01:30 -0800
commit1f750bbdb4be35311e73e5d87ba5acc784f35c79 (patch)
tree97f5236147322a5ae2d8ae14b2ca1718f271306a
parent40830db2a655e56a442e1350c9641148e775d98b (diff)
#44 resolve clippy lints
-rw-r--r--src/lib.rs2
-rw-r--r--src/main.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/lib.rs b/src/lib.rs
index d53be51..04d1fde 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -335,11 +335,11 @@ pub fn run(matches: ArgMatches) -> Result<(), Box<dyn Error>> {
/// # Arguments
///
/// * `matches` - argument matches.
+#[allow(clippy::absurd_extreme_comparisons)]
pub fn is_stdin(matches: ArgMatches) -> Result<bool, Box<dyn Error>> {
let mut is_stdin = false;
if DBG > 0 {
dbg!(env::args().len(), matches.args.len());
- dbg!(env::args().nth(0).unwrap());
}
if let Some(file) = matches.value_of(ARG_INP) {
if DBG > 0 {
diff --git a/src/main.rs b/src/main.rs
index bb14e61..d4a1063 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -92,7 +92,7 @@ fn main() {
ErrorKind::BrokenPipe => process::exit(0),
_ => false,
};
- if suppress_error == false {
+ if !suppress_error {
eprintln!(
"{} {}",
ansi_term::Colour::Fixed(9).bold().paint("error:"),