Skip to content

Commit

Permalink
Fix new deprecation warnings from Clap 3.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
shssoichiro committed Feb 18, 2022
1 parent 6dee59b commit 4c863c5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ dump_lookahead_data = ["byteorder", "image"]
arg_enum_proc_macro = "0.3"
bitstream-io = "1"
cfg-if = "1.0"
clap = { version = "3", optional = true, default-features = false, features = ["color", "std", "wrap_help"] }
clap = { version = "3.1", optional = true, default-features = false, features = ["color", "std", "wrap_help"] }
clap_complete = { version = "3", optional = true }
libc = "0.2"
y4m = { version = "0.7", optional = true }
Expand Down
10 changes: 5 additions & 5 deletions src/bin/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use crate::error::*;
use crate::muxer::{create_muxer, Muxer};
use crate::stats::MetricsEnabled;
use crate::{ColorPrimaries, MatrixCoefficients, TransferCharacteristics};
use clap::{App, AppSettings, Arg, ArgMatches};
use clap::{AppSettings, Arg, ArgMatches, Command};
use clap_complete::{generate, Shell};
use rav1e::prelude::*;
use rav1e::version;
Expand Down Expand Up @@ -85,12 +85,12 @@ pub fn parse_cli() -> Result<CliOptions, CliError> {
let ver_short = format!("{} ({})", version::short(), profile);
let ver_long = format!("{} ({})", version::full(), profile);
let speed_long_help = build_speed_long_help();
let mut app = App::new("rav1e")
let mut app = Command::new("rav1e")
.version(ver_short.as_str())
.long_version(ver_long.as_str())
.about("AV1 video encoder")
.setting(AppSettings::DeriveDisplayOrder)
.setting(AppSettings::SubcommandsNegateReqs)
.subcommand_negates_reqs(true)
.arg(Arg::new("FULLHELP")
.help("Prints more detailed help information")
.long("fullhelp"))
Expand Down Expand Up @@ -379,8 +379,8 @@ pub fn parse_cli() -> Result<CliOptions, CliError> {
.help("Overwrite output file.")
.short('y')
)
.subcommand(App::new("advanced")
.setting(AppSettings::Hidden)
.subcommand(Command::new("advanced")
.hide(true)
.about("Advanced features")
.arg(Arg::new("SHELL")
.help("Output to stdout the completion definition for the shell")
Expand Down

0 comments on commit 4c863c5

Please sign in to comment.