summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Thiel <sebastian.thiel@icloud.com>2022-02-21 11:35:24 +0800
committerSebastian Thiel <sebastian.thiel@icloud.com>2022-02-21 11:35:24 +0800
commitf9df02420d7bd4e492c4a9130833fdf31e739909 (patch)
tree14fa0bbc488fa320f2d2127a33f4ca4d1593f7d1
parent0d9fbd386c51be1995aaee70d1a87a1217d9c550 (diff)
Adjust to changes in clap
-rw-r--r--src/interactive/widgets/footer.rs2
-rw-r--r--src/main.rs2
-rw-r--r--src/options.rs8
3 files changed, 6 insertions, 6 deletions
diff --git a/src/interactive/widgets/footer.rs b/src/interactive/widgets/footer.rs
index 17def4e..0414b76 100644
--- a/src/interactive/widgets/footer.rs
+++ b/src/interactive/widgets/footer.rs
@@ -1,4 +1,4 @@
-use crate::ByteFormat;
+use dua::ByteFormat;
use std::borrow::Borrow;
use tui::{
buffer::Buffer,
diff --git a/src/main.rs b/src/main.rs
index cd3cf36..af7406c 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,7 +1,7 @@
#![forbid(unsafe_code)]
use anyhow::Result;
use clap::Parser;
-use dua::{ByteFormat, TraversalSorting};
+use dua::TraversalSorting;
use std::{fs, io, io::Write, path::PathBuf, process};
mod crossdev;
diff --git a/src/options.rs b/src/options.rs
index 5431f12..2e594a1 100644
--- a/src/options.rs
+++ b/src/options.rs
@@ -7,9 +7,9 @@ pub enum ByteFormat {
Binary,
Bytes,
GB,
- GiB,
+ Gib,
MB,
- MiB,
+ Mib,
}
impl From<ByteFormat> for LibraryByteFormat {
@@ -19,9 +19,9 @@ impl From<ByteFormat> for LibraryByteFormat {
ByteFormat::Binary => LibraryByteFormat::Binary,
ByteFormat::Bytes => LibraryByteFormat::Bytes,
ByteFormat::GB => LibraryByteFormat::GB,
- ByteFormat::GiB => LibraryByteFormat::GiB,
+ ByteFormat::Gib => LibraryByteFormat::GiB,
ByteFormat::MB => LibraryByteFormat::MB,
- ByteFormat::MiB => LibraryByteFormat::MiB,
+ ByteFormat::Mib => LibraryByteFormat::MiB,
}
}
}