Don't allow strong view handles to be read/updated with an AsyncAppContext
This avoids an invitation to hold strong view handles across async await points, which is a common source of leaks. Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
parent
689e878bd8
commit
6317e885c7
14 changed files with 129 additions and 163 deletions
|
@ -811,8 +811,6 @@ mod tests {
|
|||
}
|
||||
|
||||
impl BorrowWindowContext for DockTestContext<'_> {
|
||||
type ReturnValue<T> = T;
|
||||
|
||||
fn read_with<T, F: FnOnce(&WindowContext) -> T>(&self, window_id: usize, f: F) -> T {
|
||||
BorrowWindowContext::read_with(self.cx, window_id, f)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue