diff --git a/crates/gpui2/src/window.rs b/crates/gpui2/src/window.rs index 6f342f70654653808d6b9797c898682ba4c532e8..b02005aa78059ce249dc6d5131b862a097c34e38 100644 --- a/crates/gpui2/src/window.rs +++ b/crates/gpui2/src/window.rs @@ -1939,23 +1939,6 @@ pub trait BorrowWindow: BorrowMut + BorrowMut { }) } - /// 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( - &mut self, - element_id: Option, - f: impl FnOnce(Option, &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 { self.window()