Avoid double borrow of views on up and up_out in DragAndDrop

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Antonio Scandurra 2023-04-21 16:19:51 +02:00
parent 5b40641fde
commit 31e906d068
3 changed files with 9 additions and 5 deletions

View file

@ -2954,6 +2954,10 @@ impl<'a, 'b, 'c, V: View> ViewContext<'a, 'b, 'c, V> {
}
}
pub fn window_context(&mut self) -> &mut WindowContext<'a, 'b> {
&mut self.window_context
}
pub fn handle(&self) -> ViewHandle<V> {
ViewHandle::new(
self.window_id,