Improve StringMatchCandidate::new interface (#22011)
Release Notes: - N/A
This commit is contained in:
parent
9daa426e93
commit
25970650a7
28 changed files with 92 additions and 184 deletions
|
@ -283,11 +283,7 @@ impl PickerDelegate for CommandPaletteDelegate {
|
|||
let candidates = commands
|
||||
.iter()
|
||||
.enumerate()
|
||||
.map(|(ix, command)| StringMatchCandidate {
|
||||
id: ix,
|
||||
string: command.name.to_string(),
|
||||
char_bag: command.name.chars().collect(),
|
||||
})
|
||||
.map(|(ix, command)| StringMatchCandidate::new(ix, &command.name))
|
||||
.collect::<Vec<_>>();
|
||||
let matches = if query.is_empty() {
|
||||
candidates
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue