Fix lints

This commit is contained in:
Dmitry Sharshakov 2021-08-28 19:15:13 +03:00
parent 94901b8677
commit af657ef2ec
No known key found for this signature in database
GPG key ID: 471FD32E15FD8473

View file

@ -737,8 +737,7 @@ impl EditorView {
let completions = cxt.editor.debug_config_completions.clone().unwrap();
let noop = |_input: &str| Vec::new();
let completer = match completions.get(i) {
Some(Some(completion)) => {
match completion.get(0).and_then(|x| Some(x.as_str())) {
Some(Some(completion)) => match completion.get(0).map(|x| x.as_str()) {
Some("filename") => super::completers::filename,
Some("directory") => super::completers::directory,
Some(complete) => {
@ -746,8 +745,7 @@ impl EditorView {
noop
}
None => noop,
}
}
},
_ => noop,
};
let prompt = Prompt::new(