Add LeakDetector for gpui2
Co-Authored-By: Julia <julia@zed.dev>
This commit is contained in:
parent
22c3eb7d5f
commit
5037cca7ec
2 changed files with 126 additions and 3 deletions
|
@ -143,6 +143,11 @@ impl<V: 'static> WeakView<V> {
|
|||
let view = self.upgrade().context("error upgrading view")?;
|
||||
Ok(view.update(cx, f)).flatten()
|
||||
}
|
||||
|
||||
#[cfg(any(test, feature = "test-support"))]
|
||||
pub fn assert_dropped(&self) {
|
||||
self.model.assert_dropped()
|
||||
}
|
||||
}
|
||||
|
||||
impl<V> Clone for WeakView<V> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue