mirror of
https://github.com/clap-rs/clap
synced 2024-12-13 22:32:33 +00:00
docs: validator
takes &str, not String
Explicit link removed as it doesn't appear to be necessary
This commit is contained in:
parent
519fcc2e11
commit
bd49665bd5
1 changed files with 1 additions and 2 deletions
|
@ -1494,7 +1494,7 @@ impl<'help> Arg<'help> {
|
||||||
/// Perform a custom validation on the argument value.
|
/// Perform a custom validation on the argument value.
|
||||||
///
|
///
|
||||||
/// You provide a closure
|
/// You provide a closure
|
||||||
/// which accepts a [`String`] value, and return a [`Result`] where the [`Err(String)`] is a
|
/// which accepts a [`&str`] value, and return a [`Result`] where the [`Err(String)`] is a
|
||||||
/// message displayed to the user.
|
/// message displayed to the user.
|
||||||
///
|
///
|
||||||
/// **NOTE:** The error message does *not* need to contain the `error:` portion, only the
|
/// **NOTE:** The error message does *not* need to contain the `error:` portion, only the
|
||||||
|
@ -1525,7 +1525,6 @@ impl<'help> Arg<'help> {
|
||||||
/// assert!(res.is_ok());
|
/// assert!(res.is_ok());
|
||||||
/// assert_eq!(res.unwrap().value_of("file"), Some("some@file"));
|
/// assert_eq!(res.unwrap().value_of("file"), Some("some@file"));
|
||||||
/// ```
|
/// ```
|
||||||
/// [`String`]: std::string::String
|
|
||||||
/// [`Result`]: std::result::Result
|
/// [`Result`]: std::result::Result
|
||||||
/// [`Err(String)`]: std::result::Result::Err
|
/// [`Err(String)`]: std::result::Result::Err
|
||||||
/// [`Arc`]: std::sync::Arc
|
/// [`Arc`]: std::sync::Arc
|
||||||
|
|
Loading…
Reference in a new issue