Skip to content

Commit c03f0b5

Browse files
committed
✅ Apply clippy suggestions
1 parent f4e5e8e commit c03f0b5

1 file changed

Lines changed: 4 additions & 8 deletions

File tree

src/display/translations.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -427,10 +427,9 @@ pub fn ll(lang: Language, key: &'static str) -> &'static str {
427427
{
428428
return translated;
429429
}
430-
let mut seen = match missing_keys_set().lock() {
431-
Ok(g) => g,
432-
Err(p) => p.into_inner(),
433-
};
430+
let mut seen = missing_keys_set()
431+
.lock()
432+
.unwrap_or_else(std::sync::PoisonError::into_inner);
434433
if seen.insert(key) {
435434
crate::warn!("missing translation for key: {key}");
436435
}
@@ -439,10 +438,7 @@ pub fn ll(lang: Language, key: &'static str) -> &'static str {
439438

440439
#[cfg(test)]
441440
pub(crate) fn missing_keys_seen(key: &'static str) -> bool {
442-
missing_keys_set()
443-
.lock()
444-
.map(|s| s.contains(key))
445-
.unwrap_or(false)
441+
missing_keys_set().lock().is_ok_and(|s| s.contains(key))
446442
}
447443

448444
#[cfg(test)]

0 commit comments

Comments
 (0)