Update Clap and fix breaking changes

This commit is contained in:
Olivier 'reivilibre' 2021-11-08 12:31:01 +00:00
parent dbd4d42ac6
commit 74c369e0f6
6 changed files with 28 additions and 22 deletions

32
Cargo.lock generated
View File

@ -119,9 +119,9 @@ dependencies = [
[[package]] [[package]]
name = "clap" name = "clap"
version = "3.0.0-beta.4" version = "3.0.0-beta.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fcd70aa5597dbc42f7217a543f9ef2768b2ef823ba29036072d30e1d88e98406" checksum = "feff3878564edb93745d58cf63e17b63f24142506e7a20c87a5521ed7bfb1d63"
dependencies = [ dependencies = [
"atty", "atty",
"bitflags", "bitflags",
@ -132,14 +132,14 @@ dependencies = [
"strsim", "strsim",
"termcolor", "termcolor",
"textwrap", "textwrap",
"vec_map", "unicase",
] ]
[[package]] [[package]]
name = "clap_derive" name = "clap_derive"
version = "3.0.0-beta.4" version = "3.0.0-beta.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0b5bb0d655624a0b8770d1c178fb8ffcb1f91cc722cb08f451e3dc72465421ac" checksum = "8b15c6b4f786ffb6192ffe65a36855bc1fc2444bcd0945ae16748dcd6ed7d0d3"
dependencies = [ dependencies = [
"heck", "heck",
"proc-macro-error", "proc-macro-error",
@ -659,9 +659,12 @@ checksum = "692fcb63b64b1758029e0a96ee63e049ce8c5948587f2f7208df04625e5f6b56"
[[package]] [[package]]
name = "os_str_bytes" name = "os_str_bytes"
version = "3.1.0" version = "4.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6acbef58a60fe69ab50510a55bc8cdd4d6cf2283d27ad338f54cb52747a9cf2d" checksum = "addaa943333a514159c80c97ff4a93306530d965d27e139188283cd13e06a799"
dependencies = [
"memchr",
]
[[package]] [[package]]
name = "pkg-config" name = "pkg-config"
@ -1089,6 +1092,15 @@ dependencies = [
"static_assertions", "static_assertions",
] ]
[[package]]
name = "unicase"
version = "2.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6"
dependencies = [
"version_check",
]
[[package]] [[package]]
name = "unicode-segmentation" name = "unicode-segmentation"
version = "1.7.1" version = "1.7.1"
@ -1128,12 +1140,6 @@ version = "0.2.13"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "025ce40a007e1907e58d5bc1a594def78e5573bb0b1160bc389634e8f12e4faa" checksum = "025ce40a007e1907e58d5bc1a594def78e5573bb0b1160bc389634e8f12e4faa"
[[package]]
name = "vec_map"
version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191"
[[package]] [[package]]
name = "version_check" name = "version_check"
version = "0.9.3" version = "0.9.3"

View File

@ -11,7 +11,7 @@ description = "A chunked and deduplicated backup system using Yama"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies] [dependencies]
clap = "= 3.0.0-beta.4" clap = "= 3.0.0-beta.5"
anyhow = "1.0" anyhow = "1.0"
thiserror = "1.0" thiserror = "1.0"
serde = { version = "1.0.104", features = ["derive"] } serde = { version = "1.0.104", features = ["derive"] }

View File

@ -17,7 +17,7 @@ along with Yama. If not, see <https://www.gnu.org/licenses/>.
use std::path::{Path, PathBuf}; use std::path::{Path, PathBuf};
use clap::Clap; use clap::Parser;
use env_logger::Env; use env_logger::Env;
use anyhow::bail; use anyhow::bail;
@ -37,7 +37,7 @@ pub const WHITE: &str = "\x1b[37m";
pub const RED: &str = "\x1b[31m"; pub const RED: &str = "\x1b[31m";
pub const GREEN: &str = "\x1b[32m"; pub const GREEN: &str = "\x1b[32m";
#[derive(Clap)] #[derive(Parser)]
pub enum DatmanCommand { pub enum DatmanCommand {
/// Initialise a datman descriptor in this directory. /// Initialise a datman descriptor in this directory.
Init {}, Init {},

View File

@ -14,7 +14,7 @@ license = "GPL-3.0-or-later"
fastcdc = "1.0.2" fastcdc = "1.0.2"
zstd = "0.6.0" # 0.6.0+zstd.1.4.8 zstd = "0.6.0" # 0.6.0+zstd.1.4.8
sshish = "0.1.0" sshish = "0.1.0"
clap = "= 3.0.0-beta.4" clap = "= 3.0.0-beta.5"
blake = "2.0.0" blake = "2.0.0"
twox-hash = "1.5.0" twox-hash = "1.5.0"
serde = { version = "1.0.104", features = ["derive"] } serde = { version = "1.0.104", features = ["derive"] }

View File

@ -18,7 +18,7 @@ along with Yama. If not, see <https://www.gnu.org/licenses/>.
use std::path::{Path, PathBuf}; use std::path::{Path, PathBuf};
use anyhow::{bail, Context}; use anyhow::{bail, Context};
use clap::{crate_authors, crate_description, crate_version, Clap}; use clap::{crate_authors, crate_description, crate_version, Parser};
use log::info; use log::info;
use env_logger::Env; use env_logger::Env;
@ -31,7 +31,7 @@ use yama::operations::{checking, extracting};
use yama::pile::{Pile, PileDescriptor, RawPile}; use yama::pile::{Pile, PileDescriptor, RawPile};
use yama::{commands, debug}; use yama::{commands, debug};
#[derive(Clap)] #[derive(Parser)]
#[clap(version = crate_version!(), author = crate_authors!(), about = crate_description!())] #[clap(version = crate_version!(), author = crate_authors!(), about = crate_description!())]
struct Opts { struct Opts {
/// Chooses a different pile to be the working pile. /// Chooses a different pile to be the working pile.
@ -43,7 +43,7 @@ struct Opts {
command: PileCommand, command: PileCommand,
} }
#[derive(Clap)] #[derive(Parser)]
enum PileCommand { enum PileCommand {
/// Initialise a yama pile in this directory. /// Initialise a yama pile in this directory.
Init {}, Init {},

View File

@ -20,12 +20,12 @@ use crate::definitions::{FilesystemOwnership, FilesystemPermissions, TreeNode};
use crate::pile::{Pile, PileDescriptor, RawPile}; use crate::pile::{Pile, PileDescriptor, RawPile};
use crate::tree::integrate_node_in_place; use crate::tree::integrate_node_in_place;
use anyhow::anyhow; use anyhow::anyhow;
use clap::Clap; use clap::Parser;
use log::info; use log::info;
use rustyline::error::ReadlineError; use rustyline::error::ReadlineError;
use rustyline::Editor; use rustyline::Editor;
#[derive(Clap)] #[derive(Parser)]
pub enum DebugCommand { pub enum DebugCommand {
/// List the pointers that are stored in this yama pile. /// List the pointers that are stored in this yama pile.
#[clap(name = "lsp")] #[clap(name = "lsp")]