🎨 Colapsa if anidados sugeridos por clippy

This commit is contained in:
Manuel Cillero 2026-08-05 13:07:35 +02:00
parent 1cab0ae9a0
commit 502c00c891
5 changed files with 29 additions and 29 deletions

View file

@ -103,10 +103,10 @@ impl Locale {
}
// Si la variante regional no existe, retrocede al idioma base (p. ej. "es").
if let Some((base_lang, _)) = lang.split_once('-') {
if let Some(langid) = LANGUAGES.get(base_lang).map(|(langid, _)| langid) {
return Self::Resolved(langid);
}
if let Some((base_lang, _)) = lang.split_once('-')
&& let Some(langid) = LANGUAGES.get(base_lang).map(|(langid, _)| langid)
{
return Self::Resolved(langid);
}
// En caso contrario, indica que el idioma no está soportado.