Skip to content

Commit 951762d

Browse files
committed
feat(complete): Allow any OsString-compatible type to be a CompletionCandidate
1 parent bb6493e commit 951762d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

clap_complete/src/engine/candidate.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,9 @@ impl CompletionCandidate {
6565
self.hidden
6666
}
6767
}
68+
69+
impl<S: Into<OsString>> From<S> for CompletionCandidate {
70+
fn from(s: S) -> Self {
71+
CompletionCandidate::new(s.into())
72+
}
73+
}

0 commit comments

Comments
 (0)