From 8214e1c5339d376e5edca8e5cfd5f60a6c995a58 Mon Sep 17 00:00:00 2001 From: shahid Date: Tue, 9 Apr 2024 13:07:35 +0530 Subject: [PATCH] fix: modified populate_via_listing function to push first prefix entry while creating minute_resolve hashmap (#692) --- server/src/query/listing_table_builder.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/query/listing_table_builder.rs b/server/src/query/listing_table_builder.rs index 669d53c61..d971895e1 100644 --- a/server/src/query/listing_table_builder.rs +++ b/server/src/query/listing_table_builder.rs @@ -112,8 +112,8 @@ impl ListingTableBuilder { let hour_prefix = &prefix[0..prefix.rfind("minute").expect("minute exists")]; minute_resolve .entry(hour_prefix.to_owned()) - .and_modify(|list| list.push(prefix)) - .or_default(); + .or_insert(Vec::new()) + .push(prefix); } else { all_resolve.push(prefix) }