|
|
@@ -230,10 +230,11 @@ impl Column {
|
|
|
|
|
|
/// Formatting options for file sizes.
|
|
|
#[allow(clippy::enum_variant_names)]
|
|
|
-#[derive(PartialEq, Eq, Debug, Copy, Clone)]
|
|
|
+#[derive(PartialEq, Eq, Debug, Default, Copy, Clone)]
|
|
|
pub enum SizeFormat {
|
|
|
/// Format the file size using **decimal** prefixes, such as “kilo”,
|
|
|
/// “mega”, or “giga”.
|
|
|
+ #[default]
|
|
|
DecimalBytes,
|
|
|
|
|
|
/// Format the file size using **binary** prefixes, such as “kibi”,
|
|
|
@@ -262,12 +263,6 @@ pub enum GroupFormat {
|
|
|
Smart,
|
|
|
}
|
|
|
|
|
|
-impl Default for SizeFormat {
|
|
|
- fn default() -> Self {
|
|
|
- Self::DecimalBytes
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
/// The types of a file’s time fields. These three fields are standard
|
|
|
/// across most (all?) operating systems.
|
|
|
#[derive(PartialEq, Eq, Debug, Copy, Clone)]
|
|
|
@@ -308,20 +303,15 @@ impl TimeType {
|
|
|
}
|
|
|
|
|
|
/// How display file flags.
|
|
|
-#[derive(PartialEq, Eq, Debug, Copy, Clone)]
|
|
|
+#[derive(PartialEq, Eq, Debug, Default, Copy, Clone)]
|
|
|
pub enum FlagsFormat {
|
|
|
/// Display flags as comma seperated descriptions
|
|
|
+ #[default]
|
|
|
Long,
|
|
|
/// Display flags as single character abbreviations (Windows only)
|
|
|
Short,
|
|
|
}
|
|
|
|
|
|
-impl Default for FlagsFormat {
|
|
|
- fn default() -> Self {
|
|
|
- Self::Long
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
impl FlagsFormat {
|
|
|
pub(crate) fn deduce<V: Vars>(vars: &V) -> FlagsFormat {
|
|
|
vars.get(EZA_WINDOWS_ATTRIBUTES)
|