Skip to content

Commit

Permalink
refactor: Resolve SubCommand::with_new deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed Jan 6, 2022
1 parent 24f301b commit 6e08a30
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/cargo/util/command_prelude.rs
Expand Up @@ -17,7 +17,6 @@ use crate::util::{
use crate::CargoResult;
use anyhow::bail;
use cargo_util::paths;
use clap::{self, SubCommand};
use std::ffi::{OsStr, OsString};
use std::path::PathBuf;

Expand Down Expand Up @@ -282,8 +281,7 @@ pub fn multi_opt(name: &'static str, value_name: &'static str, help: &'static st
}

pub fn subcommand(name: &'static str) -> App {
SubCommand::with_name(name)
.setting(AppSettings::DeriveDisplayOrder | AppSettings::DontCollapseArgsInUsage)
App::new(name).setting(AppSettings::DeriveDisplayOrder | AppSettings::DontCollapseArgsInUsage)
}

/// Determines whether or not to gate `--profile` as unstable when resolving it.
Expand Down

0 comments on commit 6e08a30

Please sign in to comment.