mirror of
https://github.com/clap-rs/clap
synced 2024-12-14 14:52:33 +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 path = entry.path();
|
||||||
let mut suggestion = pathdiff::diff_paths(&path, current_dir).unwrap_or(path);
|
let mut suggestion = pathdiff::diff_paths(&path, current_dir).unwrap_or(path);
|
||||||
suggestion.push(""); // Ensure trailing `/`
|
suggestion.push(""); // Ensure trailing `/`
|
||||||
completions
|
completions.push(CompletionCandidate::new(suggestion.as_os_str().to_owned()));
|
||||||
.push(CompletionCandidate::new(suggestion.as_os_str().to_owned()).help(None));
|
|
||||||
} else {
|
} else {
|
||||||
let path = entry.path();
|
let path = entry.path();
|
||||||
if is_wanted(&path) {
|
if is_wanted(&path) {
|
||||||
let suggestion = pathdiff::diff_paths(&path, current_dir).unwrap_or(path);
|
let suggestion = pathdiff::diff_paths(&path, current_dir).unwrap_or(path);
|
||||||
completions
|
completions.push(CompletionCandidate::new(suggestion.as_os_str().to_owned()));
|
||||||
.push(CompletionCandidate::new(suggestion.as_os_str().to_owned()).help(None));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue