Skip to content

Commit a4485e8

Browse files
committed
Update deprecated usage of clap
1 parent ee95236 commit a4485e8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/cmd_line.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
/// This module defines the command-line arguments and behavior of `newdoc`.
22
/// It relies on the `clap` crate.
3-
use clap::{app_from_crate, AppSettings, Arg, ArgGroup, ArgMatches};
3+
use clap::{command, Arg, ArgGroup, ArgMatches};
44

55
/// Define the command-line arguments and return them as the `clap::ArgMatches` struct.
66
pub fn get_args() -> ArgMatches {
77
// Define command-line options
8-
let matches = app_from_crate!()
8+
let matches = command!()
99
// If no arguments are provided, print help
10-
.setting(AppSettings::ArgRequiredElseHelp)
10+
.arg_required_else_help(true)
1111
.arg(
1212
Arg::new("assembly")
1313
.short('a')

0 commit comments

Comments
 (0)