mirror of
https://github.com/clap-rs/clap
synced 2024-12-13 14:22:34 +00:00
feat(complete): Allow any OsString-compatible type to be a CompletionCandidate
This commit is contained in:
parent
bb6493e890
commit
951762db57
1 changed files with 6 additions and 0 deletions
|
@ -65,3 +65,9 @@ impl CompletionCandidate {
|
|||
self.hidden
|
||||
}
|
||||
}
|
||||
|
||||
impl<S: Into<OsString>> From<S> for CompletionCandidate {
|
||||
fn from(s: S) -> Self {
|
||||
CompletionCandidate::new(s.into())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue