We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cb1e9a5 commit e4ffea8Copy full SHA for e4ffea8
examples/completion.rs
@@ -29,7 +29,12 @@ impl Default for MyCompletion {
29
impl Completion for MyCompletion {
30
/// Simple completion implementation based on substring
31
fn get(&self, input: &str) -> Option<String> {
32
- let matches = self.options.iter().filter(|x| x.starts_with(input)).collect::<Vec<_>>();
+ let matches = self
33
+ .options
34
+ .iter()
35
+ .filter(|option| option.starts_with(input))
36
+ .collect::<Vec<_>>();
37
+
38
if matches.len() == 1 {
39
Some(matches[0].to_string())
40
} else {
0 commit comments