From 9ea882d7cca53e15900cdba7f3a91126a6aa5475 Mon Sep 17 00:00:00 2001 From: David Peter Date: Sun, 11 Sep 2022 21:29:43 +0200 Subject: [PATCH] Fix clippy suggestions --- src/exec/mod.rs | 2 +- src/exec/token.rs | 2 +- src/exit_codes.rs | 2 +- src/filter/size.rs | 2 +- src/filter/time.rs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/exec/mod.rs b/src/exec/mod.rs index fc26da2a6..da832236c 100644 --- a/src/exec/mod.rs +++ b/src/exec/mod.rs @@ -24,7 +24,7 @@ pub use self::job::{batch, job}; use self::token::Token; /// Execution mode of the command -#[derive(Debug, Clone, Copy, PartialEq)] +#[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum ExecutionMode { /// Command is executed for each search result OneByOne, diff --git a/src/exec/token.rs b/src/exec/token.rs index 0cf4df3a5..a295745b8 100644 --- a/src/exec/token.rs +++ b/src/exec/token.rs @@ -4,7 +4,7 @@ use std::fmt::{self, Display, Formatter}; /// /// Each `Token` contains either text, or a placeholder variant, which will be used to generate /// commands after all tokens for a given command template have been collected. -#[derive(Clone, Debug, PartialEq)] +#[derive(Clone, Debug, PartialEq, Eq)] pub enum Token { Placeholder, Basename, diff --git a/src/exit_codes.rs b/src/exit_codes.rs index e44111bb8..c87d8c273 100644 --- a/src/exit_codes.rs +++ b/src/exit_codes.rs @@ -3,7 +3,7 @@ use std::process; #[cfg(unix)] use nix::sys::signal::{raise, signal, SigHandler, Signal}; -#[derive(Debug, Clone, Copy, PartialEq)] +#[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum ExitCode { Success, HasResults(bool), diff --git a/src/filter/size.rs b/src/filter/size.rs index 2af20bc4e..d8ab4e8a4 100644 --- a/src/filter/size.rs +++ b/src/filter/size.rs @@ -4,7 +4,7 @@ use regex::Regex; static SIZE_CAPTURES: Lazy = Lazy::new(|| Regex::new(r"(?i)^([+-]?)(\d+)(b|[kmgt]i?b?)$").unwrap()); -#[derive(Clone, Copy, Debug, PartialEq)] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] pub enum SizeFilter { Max(u64), Min(u64), diff --git a/src/filter/time.rs b/src/filter/time.rs index eb43c4bb5..e854c393f 100644 --- a/src/filter/time.rs +++ b/src/filter/time.rs @@ -3,7 +3,7 @@ use chrono::{offset::TimeZone, DateTime, Local, NaiveDate}; use std::time::SystemTime; /// Filter based on time ranges. -#[derive(Debug, PartialEq)] +#[derive(Debug, PartialEq, Eq)] pub enum TimeFilter { Before(SystemTime), After(SystemTime),