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 useless method

Conrad Irwindb5ded025260
diff --git a/crates/gpui2/src/window.rs b/crates/gpui2/src/window.rs
index 6f342f70654..b02005aa780 100644
--- a/crates/gpui2/src/window.rs
+++ b/crates/gpui2/src/window.rs
@@ -1939,23 +1939,6 @@ pub trait BorrowWindow: BorrowMut<Window> + BorrowMut<AppContext> {
})
}
- /// Like `with_element_state`, but for situations where the element_id is optional. If the
- /// id is `None`, no state will be retrieved or stored.
- fn with_optional_element_state<S, R>(
- &mut self,
- element_id: Option<ElementId>,
- f: impl FnOnce(Option<S>, &mut Self) -> (R, S),
- ) -> R
- where
- S: 'static,
- {
- if let Some(element_id) = element_id {
- self.with_element_state(element_id, f)
- } else {
- f(None, self).0
- }
- }
-
/// Obtain the current content mask.
fn content_mask(&self) -> ContentMask<Pixels> {
self.window()