From 8d03922e3bdb9f262b2719fd9de71ac2a1b449c5 Mon Sep 17 00:00:00 2001 From: Victor Song Date: Fri, 24 Feb 2023 18:45:27 -0500 Subject: [PATCH] Addressed PR comments --- src/options/filter.rs | 1 - src/options/parser.rs | 2 +- src/theme/mod.rs | 8 ++++---- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/options/filter.rs b/src/options/filter.rs index 75e10fe..a23e59d 100644 --- a/src/options/filter.rs +++ b/src/options/filter.rs @@ -295,7 +295,6 @@ mod test { mod ignore_patterns { use super::*; use std::iter::FromIterator; - fn pat(string: &'static str) -> glob::Pattern { glob::Pattern::new(string).unwrap() diff --git a/src/options/parser.rs b/src/options/parser.rs index 7f6e388..8095237 100644 --- a/src/options/parser.rs +++ b/src/options/parser.rs @@ -91,7 +91,7 @@ pub enum Strictness { /// Whether a flag takes a value. This is applicable to both long and short /// arguments. -#[derive(Copy, Clone, PartialEq, Eq, Debug)] +#[derive(PartialEq, Eq, Debug, Copy, Clone)] pub enum TakesValue { /// This flag has to be followed by a value. diff --git a/src/theme/mod.rs b/src/theme/mod.rs index f167b7b..2eb29da 100644 --- a/src/theme/mod.rs +++ b/src/theme/mod.rs @@ -262,11 +262,11 @@ impl render::SizeColours for Theme { use number_prefix::Prefix::*; match prefix { - None => self.ui.size.number_byte, Some(Kilo | Kibi) => self.ui.size.number_kilo, Some(Mega | Mebi) => self.ui.size.number_mega, Some(Giga | Gibi) => self.ui.size.number_giga, - Some(_) => self.ui.size.number_huge, + Some(_) => self.ui.size.number_huge, + None => self.ui.size.number_byte, } } @@ -274,11 +274,11 @@ impl render::SizeColours for Theme { use number_prefix::Prefix::*; match prefix { - None => self.ui.size.unit_byte, Some(Kilo | Kibi) => self.ui.size.unit_kilo, Some(Mega | Mebi) => self.ui.size.unit_mega, Some(Giga | Gibi) => self.ui.size.unit_giga, - Some(_) => self.ui.size.unit_huge, + Some(_) => self.ui.size.unit_huge, + None => self.ui.size.unit_byte, } }