File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
src/handlers/http/modal/utils Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 1616 *
1717 */
1818
19+ use std:: collections:: HashSet ;
20+
1921use actix_web:: http:: header:: HeaderMap ;
2022use bytes:: Bytes ;
2123use ulid:: Ulid ;
@@ -97,7 +99,7 @@ pub struct LogstreamAffectedResources {
9799#[ derive( Debug , Default , serde:: Serialize ) ]
98100pub struct LogstreamAffectedDashboard {
99101 pub dashboard_id : Ulid ,
100- pub affected_tile_ids : Vec < Ulid > ,
102+ pub affected_tile_ids : HashSet < Ulid > ,
101103}
102104
103105#[ derive( thiserror:: Error , Debug ) ]
@@ -190,7 +192,7 @@ impl LogstreamAffectedResources {
190192 continue ;
191193 } ;
192194
193- let mut affected_tile_ids = Vec :: < Ulid > :: new ( ) ;
195+ let mut affected_tile_ids = HashSet :: < Ulid > :: new ( ) ;
194196 for tile in tiles {
195197 let Some ( tile_fields) = tile. other_fields . as_ref ( ) else {
196198 continue ;
@@ -209,8 +211,8 @@ impl LogstreamAffectedResources {
209211 }
210212 } ) ;
211213
212- if dbs_have_stream && !affected_tile_ids . contains ( & tile . tile_id ) {
213- affected_tile_ids. push ( tile. tile_id ) ;
214+ if dbs_have_stream {
215+ affected_tile_ids. insert ( tile. tile_id ) ;
214216 }
215217 }
216218 }
You can’t perform that action at this time.
0 commit comments