Skip to content
This repository was archived by the owner on May 20, 2020. It is now read-only.

Commit 87a9e02

Browse files
authored
Merge pull request #225 from hjr3/fix-moved-flags-check
Do not check subcommands for moved flags
2 parents 07801eb + dd91212 commit 87a9e02

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/main.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -235,11 +235,10 @@ fn check_moved_flags(matches: &ArgMatches) -> Result<()> {
235235
("target", build_msg),
236236
("sysroot", build_msg),
237237
("test", "Use in conjunction with the test subcommand."),
238-
("test", "Use the test subcommand."),
239238
];
240239

241240
for &(flag, err_msg) in moved_flags.iter() {
242-
if matches.is_present(flag) {
241+
if matches.args.contains_key(flag) {
243242
return Err(error::MovedFlag {
244243
flag_name: flag.to_string(),
245244
msg: err_msg.to_string(),

0 commit comments

Comments
 (0)