mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-24 02:46:43 +00:00
Get tests passing
This commit is contained in:
parent
884cee6dfd
commit
8e36da1382
1 changed files with 8 additions and 1 deletions
|
@ -3831,7 +3831,14 @@ impl<V: View> WindowHandle<V> {
|
||||||
// TODO: Implement window dropping behavior when we don't call this.
|
// TODO: Implement window dropping behavior when we don't call this.
|
||||||
pub fn detach(mut self, cx: &impl BorrowAppContext) -> ViewHandle<V> {
|
pub fn detach(mut self, cx: &impl BorrowAppContext) -> ViewHandle<V> {
|
||||||
let root = self.root(cx);
|
let root = self.root(cx);
|
||||||
self.any_handle.ref_counts.take();
|
let ref_counts = self.any_handle.ref_counts.take();
|
||||||
|
#[cfg(any(test, feature = "test-support"))]
|
||||||
|
ref_counts
|
||||||
|
.unwrap()
|
||||||
|
.lock()
|
||||||
|
.leak_detector
|
||||||
|
.lock()
|
||||||
|
.handle_dropped(self.id(), self.any_handle.handle_id);
|
||||||
root
|
root
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue