fix: build failure caused by codeberg #7 (codeberg #8)

Reviewed-on: https://codeberg.org/iff/pay-respects/pulls/8
Co-authored-by: Integral <integral@member.fsf.org>
Co-committed-by: Integral <integral@member.fsf.org>
This commit is contained in:
Integral 2024-12-14 17:31:56 +00:00 committed by iff
parent 7c7cc4d285
commit 9728ce48a6
2 changed files with 6 additions and 6 deletions

View file

@ -208,14 +208,14 @@ pub fn typo(suggest: &mut String, replace_list: &mut Vec<TokenStream2>) {
"\")"
);
format!(
"suggest_typo(&split[{}], {}, executables)",
"suggest_typo(&split[{}], &{}, executables)",
string_index, function
)
} else {
let string_match_list = match_list.join("\".to_string(), \"");
let string_match_list = format!("\"{}\".to_string()", string_match_list);
format!(
"suggest_typo(&split[{}], vec![{}], executables)",
"suggest_typo(&split[{}], &[{}], executables)",
string_index, string_match_list
)
};
@ -243,8 +243,8 @@ pub fn shell_tag(suggest: &mut String, replace_list: &mut Vec<TokenStream2>, cmd
let tag_name = "shell";
for command in cmd_list {
if suggest.contains(&command) {
*suggest = suggest.replace(&command, &tag(tag_name, replace_tag));
if suggest.contains(command) {
*suggest = suggest.replace(command, &tag(tag_name, replace_tag));
let split = command.split_once(',').unwrap();
let argument = split.1.trim_end_matches(')').trim();