From e9230b8b545a178c296ba1a602097a386f83cfdd Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Mon, 20 Oct 2025 17:09:10 +0200 Subject: [PATCH] :sparkles: Change internal data type for tiles --- render-wasm/src/tiles.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/render-wasm/src/tiles.rs b/render-wasm/src/tiles.rs index 813386a771..5f9a0dd98b 100644 --- a/render-wasm/src/tiles.rs +++ b/render-wasm/src/tiles.rs @@ -1,6 +1,5 @@ use crate::uuid::Uuid; use crate::view::Viewbox; -use indexmap::IndexSet; use skia_safe as skia; use std::collections::{HashMap, HashSet}; @@ -114,7 +113,7 @@ pub fn get_tile_rect(tile: Tile, scale: f32) -> skia::Rect { // This structure is usseful to keep all the shape uuids by shape id. pub struct TileHashMap { - grid: HashMap>, + grid: HashMap>, index: HashMap>, } @@ -126,13 +125,13 @@ impl TileHashMap { } } - pub fn get_shapes_at(&mut self, tile: Tile) -> Option<&IndexSet> { + pub fn get_shapes_at(&mut self, tile: Tile) -> Option<&HashSet> { self.grid.get(&tile) } pub fn remove_shape_at(&mut self, tile: Tile, id: Uuid) { if let Some(shapes) = self.grid.get_mut(&tile) { - shapes.shift_remove(&id); + shapes.remove(&id); } if let Some(tiles) = self.index.get_mut(&id) {