From 4aefe1f1fe4828e3c0c4af6e73eacd54600d13af Mon Sep 17 00:00:00 2001 From: jglad Date: Sat, 8 Feb 2025 10:59:15 +0100 Subject: [PATCH] refactor --- crates/notedeck_columns/src/decks.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/crates/notedeck_columns/src/decks.rs b/crates/notedeck_columns/src/decks.rs index adeabbec..7295600a 100644 --- a/crates/notedeck_columns/src/decks.rs +++ b/crates/notedeck_columns/src/decks.rs @@ -37,11 +37,7 @@ impl Default for DecksCache { impl DecksCache { pub fn new(mut account_to_decks: HashMap) -> Self { let fallback_pubkey = FALLBACK_PUBKEY(); - - // Ensure fallback deck exists - if !account_to_decks.contains_key(&fallback_pubkey) { - account_to_decks.insert(fallback_pubkey, Decks::default()); - } + account_to_decks.entry(fallback_pubkey).or_default(); Self { account_to_decks,