Correct replacement function for Parser::from_clap

This commit is contained in:
Dominik Boehi 2022-01-04 22:29:39 +01:00 committed by GitHub
parent 252dec02d9
commit ae55a9da68
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -168,7 +168,7 @@ pub trait Parser: FromArgMatches + IntoApp + Sized {
/// [`Parser`])
#[deprecated(
since = "3.0.0",
note = "`StructOpt::clap` is replaced with `IntoApp::into_app` (derived as part of `Parser`)"
note = "`StructOpt::from_clap` is replaced with `FromArgMatches::from_arg_matches` (derived as part of `Parser`)"
)]
fn from_clap(matches: &ArgMatches) -> Self {
<Self as FromArgMatches>::from_arg_matches(matches).unwrap()