From 459016e70dd4933a8082d27748097de81a3e53ff Mon Sep 17 00:00:00 2001 From: Joris Date: Mon, 17 Apr 2023 21:10:48 +0200 Subject: Follow clippy indications --- src/utils/text.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/utils') diff --git a/src/utils/text.rs b/src/utils/text.rs index 3a6f495..8985210 100644 --- a/src/utils/text.rs +++ b/src/utils/text.rs @@ -1,8 +1,8 @@ -pub fn format_search(str: &String) -> String { +pub fn format_search(str: &str) -> String { format!("%{}%", unaccent(&str.to_lowercase())) } -pub fn unaccent(str: &String) -> String { +pub fn unaccent(str: &str) -> String { str.chars().map(unaccent_char).collect() } -- cgit v1.2.3