From bd49665bd5c889a016c8a04030c0b4b9adce6de4 Mon Sep 17 00:00:00 2001 From: Malloc Voidstar <1284317+AlyoshaVasilieva@users.noreply.github.com> Date: Wed, 9 Feb 2022 20:49:08 -0800 Subject: [PATCH] docs: `validator` takes &str, not String Explicit link removed as it doesn't appear to be necessary --- src/build/arg/mod.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/build/arg/mod.rs b/src/build/arg/mod.rs index 5b616012..b89acd00 100644 --- a/src/build/arg/mod.rs +++ b/src/build/arg/mod.rs @@ -1494,7 +1494,7 @@ impl<'help> Arg<'help> { /// Perform a custom validation on the argument value. /// /// 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. /// /// **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_eq!(res.unwrap().value_of("file"), Some("some@file")); /// ``` - /// [`String`]: std::string::String /// [`Result`]: std::result::Result /// [`Err(String)`]: std::result::Result::Err /// [`Arc`]: std::sync::Arc