diff options
author | Sebastian Thiel <sebastian.thiel@icloud.com> | 2023-03-12 08:06:46 +0100 |
---|---|---|
committer | Sebastian Thiel <sebastian.thiel@icloud.com> | 2023-03-12 08:06:46 +0100 |
commit | b474b8146de6ce925098b08a1d6af62aa0c25f77 (patch) | |
tree | 3908c3cb25c86dc24006422424cd634cb6ddd0fa | |
parent | 3ccf204a18c784a7af7b6255173b332e0083c047 (diff) |
refactor
-rw-r--r-- | src/options.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/options.rs b/src/options.rs index 6b79278..ab48980 100644 --- a/src/options.rs +++ b/src/options.rs @@ -1,5 +1,5 @@ use dua::ByteFormat as LibraryByteFormat; -use std::{env, path::PathBuf}; +use std::path::PathBuf; #[derive(PartialEq, Eq, Debug, Clone, Copy, clap::ValueEnum)] pub enum ByteFormat { @@ -27,10 +27,10 @@ impl From<ByteFormat> for LibraryByteFormat { } fn dft_format() -> ByteFormat { - if env::consts::OS != "macos" { - ByteFormat::Binary - } else { + if std::env::consts::OS == "macos" { ByteFormat::Metric + } else { + ByteFormat::Binary } } |