Skip to content

Commit d8b3aea

Browse files
committed
Fix clap deprecation warnings
1 parent 6b77dbf commit d8b3aea

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/main.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,16 +91,15 @@ impl BuildKind {
9191
}
9292

9393
fn parse_args() -> Args {
94-
use clap::{App, Arg, ArgGroup};
94+
use clap::{Arg, ArgGroup, Command};
9595
use std::iter::FromIterator;
9696
let version = option_env!("CARGO_PKG_VERSION").unwrap_or("unknown");
9797
let about = r#"Compiles and runs a Rust script."#;
9898

99-
let app = App::new(consts::PROGRAM_NAME)
99+
let app = Command::new(consts::PROGRAM_NAME)
100100
.version(version)
101101
.about(about)
102-
.setting(clap::AppSettings::TrailingVarArg)
103-
//.override_help(about)
102+
.trailing_var_arg(true)
104103
.arg(Arg::new("script")
105104
.index(1)
106105
.help("Script file or expression to execute.")

0 commit comments

Comments
 (0)