update return signature for try_from_os_str

This commit is contained in:
Michael Hall 2022-06-13 11:15:56 +10:00 committed by GitHub
parent 8bb3853eb5
commit 066c351639
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -268,7 +268,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, String>` | (no default function) |
| `from_occurrences` | `fn(u64) -> T` | `value as T` |
| `from_flag` | `fn(bool) -> T` | `::std::convert::From::from` |