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
|
@ -78,11 +78,7 @@ impl SlashCommandCompletionProvider {
|
|||
.command_names(cx)
|
||||
.into_iter()
|
||||
.enumerate()
|
||||
.map(|(ix, def)| StringMatchCandidate {
|
||||
id: ix,
|
||||
string: def.to_string(),
|
||||
char_bag: def.as_ref().into(),
|
||||
})
|
||||
.map(|(ix, def)| StringMatchCandidate::new(ix, &def))
|
||||
.collect::<Vec<_>>();
|
||||
let command_name = command_name.to_string();
|
||||
let editor = self.editor.clone();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue