diff --git a/src/builder/value_parser.rs b/src/builder/value_parser.rs index 3f61433b..cfbfc238 100644 --- a/src/builder/value_parser.rs +++ b/src/builder/value_parser.rs @@ -2105,18 +2105,17 @@ pub mod via_prelude { } #[doc(hidden)] - pub trait _ValueParserViaFromStr: private::_ValueParserViaFromStrSealed { + pub trait _ValueParserViaParse: private::_ValueParserViaParseSealed { fn value_parser(&self) -> _AnonymousValueParser; } - impl _ValueParserViaFromStr for _AutoValueParser + impl _ValueParserViaParse for _AutoValueParser where - FromStr: std::str::FromStr + std::any::Any + Clone + Send + Sync + 'static, - ::Err: - Into>, + Parse: std::str::FromStr + std::any::Any + Clone + Send + Sync + 'static, + ::Err: Into>, { fn value_parser(&self) -> _AnonymousValueParser { - let func: fn(&str) -> Result::Err> = - FromStr::from_str; + let func: fn(&str) -> Result::Err> = + Parse::from_str; _AnonymousValueParser(ValueParser::new(func)) } } @@ -2226,12 +2225,11 @@ mod private { { } - pub trait _ValueParserViaFromStrSealed {} - impl _ValueParserViaFromStrSealed for _AutoValueParser + pub trait _ValueParserViaParseSealed {} + impl _ValueParserViaParseSealed for _AutoValueParser where - FromStr: std::str::FromStr + std::any::Any + Send + Sync + 'static, - ::Err: - Into>, + Parse: std::str::FromStr + std::any::Any + Send + Sync + 'static, + ::Err: Into>, { } }