chore: clippy

This commit is contained in:
Maccesch 2024-08-13 13:56:13 +01:00
parent 61c112c140
commit b1367a9f0b

View file

@ -58,13 +58,13 @@ where
.map(|l| l.as_ref().clone())
.collect::<Vec<_>>();
const EMPTY_ERR_MSG: &'static str = "Empty supported list. You have to provide at least one locale in the `supported` parameter";
assert!(supported.len() > 0, "{}", EMPTY_ERR_MSG);
const EMPTY_ERR_MSG: & str = "Empty supported list. You have to provide at least one locale in the `supported` parameter";
assert!(!supported.is_empty(), "{}", EMPTY_ERR_MSG);
Signal::derive(move || {
let supported = supported.clone();
client_locales.with(|clienht_locales| {
client_locales.with(|client_locales| {
let mut first_supported = None;
for s in supported {
@ -72,7 +72,7 @@ where
first_supported = Some(s.clone());
}
for client_locale in clienht_locales {
for client_locale in client_locales {
let client_locale: LanguageIdentifier = client_locale
.parse()
.expect("Client should provide a list of valid unicode locales");