Merge pull request #3818 from mbhall88/patch-1

docs: update return signature for try_from_os_str
This commit is contained in:
Ed Page 2022-06-13 19:18:39 -05:00 committed by GitHub
commit 1ba6ef9080
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -271,7 +271,7 @@ You can then support your custom type with `#[clap(parse(<kind> [= <function>]))
| `from_str` | `fn(&str) -> T` | `::std::convert::From::from` |
| `try_from_str` (default) | `fn(&str) -> Result<T, E>` | `::std::str::FromStr::from_str` |
| `from_os_str` | `fn(&OsStr) -> T` | `::std::convert::From::from` |
| `try_from_os_str` | `fn(&OsStr) -> Result<T, OsString>` | (no default function) |
| `try_from_os_str` | `fn(&OsStr) -> Result<T, E>` | (no default function) |
| `from_occurrences` | `fn(u64) -> T` | `value as T` |
| `from_flag` | `fn(bool) -> T` | `::std::convert::From::from` |