Skip to content

Commit e4ffea8

Browse files
committed
fix formatting and improve naming
1 parent cb1e9a5 commit e4ffea8

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

examples/completion.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,12 @@ impl Default for MyCompletion {
2929
impl Completion for MyCompletion {
3030
/// Simple completion implementation based on substring
3131
fn get(&self, input: &str) -> Option<String> {
32-
let matches = self.options.iter().filter(|x| x.starts_with(input)).collect::<Vec<_>>();
32+
let matches = self
33+
.options
34+
.iter()
35+
.filter(|option| option.starts_with(input))
36+
.collect::<Vec<_>>();
37+
3338
if matches.len() == 1 {
3439
Some(matches[0].to_string())
3540
} else {

0 commit comments

Comments
 (0)