aboutsummaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
authorJoris2023-04-17 21:10:48 +0200
committerJoris2023-04-17 21:10:48 +0200
commit459016e70dd4933a8082d27748097de81a3e53ff (patch)
tree0ed14ecc8762d62a55bf8c05356bcc984b1a0cea /src/utils
parent3932daa26360d6e03807381d0b8ffa2d0e704847 (diff)
Follow clippy indications
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()
}