mirror of
https://github.com/TECHNOFAB11/pay-respects.git
synced 2025-12-12 06:20:09 +01:00
chore: cleanup
This commit is contained in:
parent
eb4d71e157
commit
7980819d6a
4 changed files with 6 additions and 8 deletions
|
|
@ -21,8 +21,6 @@ regex-lite = "0.1"
|
||||||
|
|
||||||
inquire = "0.7.5"
|
inquire = "0.7.5"
|
||||||
|
|
||||||
# pay-respects-parser = "0.3.3"
|
|
||||||
# pay-respects-utils = "0.1.2"
|
|
||||||
pay-respects-parser = { version = "0.3.4", path = "../parser" }
|
pay-respects-parser = { version = "0.3.4", path = "../parser" }
|
||||||
pay-respects-utils = { version ="0.1.3", path = "../utils"}
|
pay-respects-utils = { version ="0.1.3", path = "../utils"}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ pub fn suggest_candidates(data: &mut Data) {
|
||||||
thread::scope(|s| {
|
thread::scope(|s| {
|
||||||
s.spawn(|| {
|
s.spawn(|| {
|
||||||
for module in modules {
|
for module in modules {
|
||||||
let new_candidates = module_output(&data, module);
|
let new_candidates = module_output(data, module);
|
||||||
|
|
||||||
if let Some(candidates) = new_candidates {
|
if let Some(candidates) = new_candidates {
|
||||||
add_candidates_no_dup(command, &mut module_candidates, &candidates);
|
add_candidates_no_dup(command, &mut module_candidates, &candidates);
|
||||||
|
|
|
||||||
|
|
@ -207,10 +207,10 @@ pub fn exes(
|
||||||
|
|
||||||
let matches = {
|
let matches = {
|
||||||
let res = best_matches_path(&split_command[index], executables);
|
let res = best_matches_path(&split_command[index], executables);
|
||||||
if res.is_none() {
|
if let Some(res) = res {
|
||||||
vec![split_command[index].clone()]
|
res
|
||||||
} else {
|
} else {
|
||||||
res.unwrap()
|
vec![split_command[index].clone()]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
for match_ in matches {
|
for match_ in matches {
|
||||||
|
|
@ -219,7 +219,7 @@ pub fn exes(
|
||||||
|
|
||||||
let tag = "{{exes}}";
|
let tag = "{{exes}}";
|
||||||
let placeholder = suggest[placeholder.clone()].to_owned();
|
let placeholder = suggest[placeholder.clone()].to_owned();
|
||||||
*suggest = suggest.replace(&placeholder, &tag);
|
*suggest = suggest.replace(&placeholder, tag);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -268,7 +268,7 @@ pub fn exes(suggest: &mut String, exes_list: &mut Vec<TokenStream2>) {
|
||||||
|
|
||||||
let tag = "{{{{exes}}}}";
|
let tag = "{{{{exes}}}}";
|
||||||
let placeholder = suggest[placeholder.clone()].to_owned();
|
let placeholder = suggest[placeholder.clone()].to_owned();
|
||||||
*suggest = suggest.replace(&placeholder, &tag);
|
*suggest = suggest.replace(&placeholder, tag);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue