aboutsummaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/text.rs4
1 files changed, 2 insertions, 2 deletions
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()
}