diff --git a/src/formats.rs b/src/formats.rs index e6d6135..0c2c43b 100644 --- a/src/formats.rs +++ b/src/formats.rs @@ -55,7 +55,7 @@ macro_rules! writablesln { }; } -#[derive(Debug, PartialEq)] +#[derive(Debug, PartialEq, Eq)] pub enum Writable<'a> { String(&'a str), Path(&'a Path), @@ -111,7 +111,7 @@ pub fn smart_write(f: &mut W, writeables: &[Writable]) -> io::Result<( // f.write_all(&*path.as_os_str().encode_wide().collect::>())?; write!(f, "{}", path.as_os_str().to_string_lossy())?; } else { - f.write_all(&*path.as_os_str().as_bytes())?; + f.write_all(path.as_os_str().as_bytes())?; } } write!(f, "'")?; diff --git a/src/parameters.rs b/src/parameters.rs index 77e9a37..931fa5a 100644 --- a/src/parameters.rs +++ b/src/parameters.rs @@ -22,7 +22,7 @@ cfg_if! { } } -#[derive(ArgEnum, PartialEq, Debug, Copy, Clone)] +#[derive(ArgEnum, Eq, PartialEq, Debug, Copy, Clone)] /// The format to use when running fif without the `--fix` flag. Specified at runtime with the `-o`/`--output-format` /// flag. pub enum OutputFormat { @@ -39,7 +39,7 @@ pub enum OutputFormat { Json, } -#[derive(ArgEnum, PartialEq, Debug, Copy, Clone)] +#[derive(ArgEnum, Eq, PartialEq, Debug, Copy, Clone)] /// Specifies under what conditions the user should be prompted when running fif in `--fix` mode. Defaults to `Error`. /// Specified at runtime with the `-p`/`--prompt` flag. pub enum Prompt { @@ -195,7 +195,7 @@ fn validate_exts(exts: &str) -> Result<(), String> { } /// Further options relating to scanning. -#[derive(PartialEq, Debug, Copy, Clone)] +#[derive(Eq, PartialEq, Debug, Copy, Clone)] #[allow(clippy::struct_excessive_bools)] pub struct ScanOpts { /// Whether hidden files and directories should be scanned. @@ -298,7 +298,7 @@ impl Parameters { } /// Sets of extensions for use with [Parameter](crate::parameters::Parameters)'s `-E` flag. -#[derive(ArgEnum, PartialEq, Debug, Copy, Clone)] +#[derive(ArgEnum, Eq, PartialEq, Debug, Copy, Clone)] pub enum ExtensionSet { /// Extensions used for image file formats, such as `png`, `jpeg`, `webp`, etc. Images,