Skip to content

Commit

Permalink
feat: Update clap to v4
Browse files Browse the repository at this point in the history
  • Loading branch information
afnanenayet committed Oct 6, 2022
1 parent 3ec52c0 commit 51a782f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 41 deletions.
45 changes: 9 additions & 36 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ include = [

[dependencies]
tree-sitter = "0.20.9"
clap = { version = "3.2.22", features = [
clap = { version = "4.0.8", features = [
"derive",
"env",
"unicode",
"wrap_help",
] }
clap_complete = "3.2.5"
clap_complete = "4.0.2"
anyhow = "1.0.65"
phf = { version = "0.11.1", features = ["macros"] }
console = "0.15.2"
Expand Down
4 changes: 2 additions & 2 deletions src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ pub struct Args {
///
/// Text that is in this file but is not in the new file is considered a deletion
// #[clap(name = "OLD", parse(from_os_str), required_unless_present = "cmd")]
#[clap(name = "OLD", parse(from_os_str))]
#[clap(name = "OLD")]
pub old: Option<PathBuf>,
/// The file that the old file is compared against
///
/// Text that is in this file but is not in the old file is considered an addition
// #[clap(name = "NEW", parse(from_os_str), required_unless_present = "cmd")]
#[clap(name = "NEW", parse(from_os_str))]
#[clap(name = "NEW")]
pub new: Option<PathBuf>,
/// Manually set the file type for the given files
///
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ mod parse;
use crate::parse::supported_languages;
use ::console::Term;
use anyhow::Result;
use clap::CommandFactory;
use clap::FromArgMatches;
use clap::IntoApp;
use cli::Args;
use config::{Config, ReadError};
use formatting::{DisplayParameters, DocumentDiffData};
Expand Down

0 comments on commit 51a782f

Please sign in to comment.