mirror of
https://github.com/clap-rs/clap
synced 2024-11-10 06:44:16 +00:00
refactor(complete): Remove no-op help calls
This commit is contained in:
parent
2f07f3cc61
commit
ebb1302e90
1 changed files with 2 additions and 4 deletions
|
@ -375,14 +375,12 @@ fn complete_path(
|
|||
let path = entry.path();
|
||||
let mut suggestion = pathdiff::diff_paths(&path, current_dir).unwrap_or(path);
|
||||
suggestion.push(""); // Ensure trailing `/`
|
||||
completions
|
||||
.push(CompletionCandidate::new(suggestion.as_os_str().to_owned()).help(None));
|
||||
completions.push(CompletionCandidate::new(suggestion.as_os_str().to_owned()));
|
||||
} else {
|
||||
let path = entry.path();
|
||||
if is_wanted(&path) {
|
||||
let suggestion = pathdiff::diff_paths(&path, current_dir).unwrap_or(path);
|
||||
completions
|
||||
.push(CompletionCandidate::new(suggestion.as_os_str().to_owned()).help(None));
|
||||
completions.push(CompletionCandidate::new(suggestion.as_os_str().to_owned()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue