Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Remove unused `PlatformAtlas::clear` method

Antonio Scandurra559461923fba
diff --git a/crates/gpui/src/platform.rs b/crates/gpui/src/platform.rs
index dfb85104fec..f43e96280f4 100644
--- a/crates/gpui/src/platform.rs
+++ b/crates/gpui/src/platform.rs
@@ -282,8 +282,6 @@ pub(crate) trait PlatformAtlas: Send + Sync {
key: &AtlasKey,
build: &mut dyn FnMut() -> Result<(Size<DevicePixels>, Cow<'a, [u8]>)>,
) -> Result<AtlasTile>;
-
- fn clear(&self);
}
#[derive(Clone, Debug, PartialEq, Eq)]
diff --git a/crates/gpui/src/platform/mac/metal_atlas.rs b/crates/gpui/src/platform/mac/metal_atlas.rs
index 10ca53530e2..d3caeba5222 100644
--- a/crates/gpui/src/platform/mac/metal_atlas.rs
+++ b/crates/gpui/src/platform/mac/metal_atlas.rs
@@ -74,20 +74,6 @@ impl PlatformAtlas for MetalAtlas {
Ok(tile)
}
}
-
- fn clear(&self) {
- let mut lock = self.0.lock();
- lock.tiles_by_key.clear();
- for texture in &mut lock.monochrome_textures {
- texture.clear();
- }
- for texture in &mut lock.polychrome_textures {
- texture.clear();
- }
- for texture in &mut lock.path_textures {
- texture.clear();
- }
- }
}
impl MetalAtlasState {
diff --git a/crates/gpui/src/platform/test/window.rs b/crates/gpui/src/platform/test/window.rs
index 5c8a3e5a59c..2f080bd7098 100644
--- a/crates/gpui/src/platform/test/window.rs
+++ b/crates/gpui/src/platform/test/window.rs
@@ -325,10 +325,4 @@ impl PlatformAtlas for TestAtlas {
Ok(state.tiles[key].clone())
}
-
- fn clear(&self) {
- let mut state = self.0.lock();
- state.tiles = HashMap::default();
- state.next_id = 0;
- }
}