parent
2bb06be4aa
commit
4abae93aa1
@ -1,66 +0,0 @@
|
||||
From 946a6a3547d1f6ca7347bed9d77c750d686ad505 Mon Sep 17 00:00:00 2001
|
||||
From: Fabio Valentini <decathorpe@gmail.com>
|
||||
Date: Mon, 22 Nov 2021 20:58:46 +0100
|
||||
Subject: [PATCH] port to clap 3.0.0-beta.5
|
||||
|
||||
---
|
||||
src/main.rs | 2 +-
|
||||
src/options.rs | 11 +++++------
|
||||
2 files changed, 6 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/src/main.rs b/src/main.rs
|
||||
index d45672f..0b86049 100644
|
||||
--- a/src/main.rs
|
||||
+++ b/src/main.rs
|
||||
@@ -1,6 +1,6 @@
|
||||
#![forbid(unsafe_code)]
|
||||
use anyhow::Result;
|
||||
-use clap::Clap;
|
||||
+use clap::Parser;
|
||||
use dua::{ByteFormat, TraversalSorting};
|
||||
use std::{fs, io, io::Write, path::PathBuf, process};
|
||||
|
||||
diff --git a/src/options.rs b/src/options.rs
|
||||
index d8167c5..dce3af6 100644
|
||||
--- a/src/options.rs
|
||||
+++ b/src/options.rs
|
||||
@@ -1,4 +1,4 @@
|
||||
-use clap::Clap;
|
||||
+use clap::Parser;
|
||||
use dua::ByteFormat as LibraryByteFormat;
|
||||
use std::path::PathBuf;
|
||||
use std::str::FromStr;
|
||||
@@ -50,10 +50,9 @@ impl From<ByteFormat> for LibraryByteFormat {
|
||||
}
|
||||
}
|
||||
|
||||
-#[derive(Debug, Clap)]
|
||||
+#[derive(Debug, Parser)]
|
||||
#[clap(name = "dua", about = "A tool to learn about disk usage, fast!", version = clap::crate_version!())]
|
||||
-#[clap(setting = clap::AppSettings::ColoredHelp)]
|
||||
-#[clap(setting = clap::AppSettings::GlobalVersion)]
|
||||
+#[clap(setting = clap::AppSettings::PropagateVersion)]
|
||||
#[clap(override_usage = "dua [FLAGS] [OPTIONS] [SUBCOMMAND] [input]...")]
|
||||
pub struct Args {
|
||||
#[clap(subcommand)]
|
||||
@@ -85,7 +84,7 @@ pub struct Args {
|
||||
/// GiB - only gibibytes
|
||||
/// MB - only megabytes
|
||||
/// MiB - only mebibytes
|
||||
- #[clap(short = 'f', long, case_insensitive = true, possible_values(&ByteFormat::VARIANTS))]
|
||||
+ #[clap(short = 'f', long, case_insensitive = true, possible_values(ByteFormat::VARIANTS))]
|
||||
pub format: Option<ByteFormat>,
|
||||
|
||||
/// Display apparent size instead of disk usage.
|
||||
@@ -105,7 +104,7 @@ pub struct Args {
|
||||
pub input: Vec<PathBuf>,
|
||||
}
|
||||
|
||||
-#[derive(Debug, Clap)]
|
||||
+#[derive(Debug, Parser)]
|
||||
pub enum Command {
|
||||
/// Launch the terminal user interface
|
||||
#[cfg(any(feature = "tui-unix", feature = "tui-crossplatform"))]
|
||||
--
|
||||
2.33.1
|
||||
|
@ -1,26 +1,49 @@
|
||||
--- dua-cli-2.11.1/Cargo.toml 1970-01-01T00:00:00+00:00
|
||||
+++ dua-cli-2.11.1/Cargo.toml 2021-08-23T09:45:50.357053+00:00
|
||||
@@ -52,7 +52,7 @@
|
||||
--- dua-cli-2.17.0/Cargo.toml 1970-01-01T00:00:01+00:00
|
||||
+++ dua-cli-2.17.0/Cargo.toml 2022-02-07T20:11:48.200184+00:00
|
||||
@@ -45,14 +45,14 @@
|
||||
version = "4"
|
||||
|
||||
[dependencies.clap]
|
||||
-version = "=3.0.0-rc.8"
|
||||
+version = "3.0.0"
|
||||
features = ["derive", "cargo"]
|
||||
|
||||
[dependencies.colored]
|
||||
version = "2.0.0"
|
||||
|
||||
[dependencies.crosstermion]
|
||||
-version = "0.6.0"
|
||||
-version = "0.8.1"
|
||||
+version = "0.7.0"
|
||||
optional = true
|
||||
default-features = false
|
||||
|
||||
@@ -76,12 +76,12 @@
|
||||
version = "0.5"
|
||||
@@ -73,19 +73,19 @@
|
||||
optional = true
|
||||
|
||||
[dependencies.petgraph]
|
||||
-version = "0.6"
|
||||
+version = "0.5.1"
|
||||
|
||||
[dependencies.trash]
|
||||
version = "2.0.1"
|
||||
optional = true
|
||||
|
||||
[dependencies.tui]
|
||||
-version = "0.14.0"
|
||||
-version = "0.16.0"
|
||||
+version = "0.15.0"
|
||||
optional = true
|
||||
default-features = false
|
||||
|
||||
[dependencies.tui-react]
|
||||
-version = "0.14"
|
||||
+version = "0.15"
|
||||
-version = "0.16.0"
|
||||
+version = "0.15.0"
|
||||
optional = true
|
||||
|
||||
[dependencies.unicode-segmentation]
|
||||
@@ -104,6 +104,3 @@
|
||||
tui-crossplatform = ["crosstermion/tui-react-crossterm", "tui-shared"]
|
||||
tui-shared = ["tui", "tui-react", "open", "unicode-segmentation"]
|
||||
tui-unix = ["crosstermion/tui-react-termion", "tui-shared"]
|
||||
-[target."cfg(all(target_os = \"macos\", target_arch = \"aarch64\"))".dependencies.sysinfo]
|
||||
-version = "0.22.3"
|
||||
-default-features = false
|
||||
|
@ -1 +1 @@
|
||||
SHA512 (dua-cli-2.11.1.crate) = 68cd6e24c5580708ba65b4d4be39002dd06e7ff515808cfb46245c14f46b265858596a8aa06e17c688578b684e288a8908bc1ef9b1abb603a467ff075e6f2ff5
|
||||
SHA512 (dua-cli-2.17.0.crate) = 8c24449c57ac4d4664a8839287bd58154df510c1cdf133cace9d013da63c6b64e88afa3c99d9f922e092583a7267cf348ba4c0b61097075f14cbd71593391102
|
||||
|
Loading…
Reference in new issue