From f245bf07d03135259adc664f3f72a00a11367949 Mon Sep 17 00:00:00 2001 From: Charles Edward Gagnon Date: Tue, 13 Aug 2024 22:11:43 -0400 Subject: [PATCH] fix some clippy lints --- src/use_locale.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/use_locale.rs b/src/use_locale.rs index be781a4..b423179 100644 --- a/src/use_locale.rs +++ b/src/use_locale.rs @@ -58,8 +58,8 @@ where .map(|l| l.as_ref().clone()) .collect::>(); - 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();