refactor: replace Vec<T> with &[T] in function parameters (codeberg #7)

Reviewed-on: https://codeberg.org/iff/pay-respects/pulls/7
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 16:53:03 +00:00 committed by iff
parent 7c74d13705
commit 7c7cc4d285
5 changed files with 7 additions and 11 deletions

View file

@ -69,7 +69,7 @@ pub fn split_command(command: &str) -> Vec<String> {
split_command
}
pub fn suggest_typo(typos: &[String], candidates: Vec<String>, executables: &[String]) -> String {
pub fn suggest_typo(typos: &[String], candidates: &[String], executables: &[String]) -> String {
let mut suggestions = Vec::new();
for typo in typos {
let typo = typo.as_str();