Fix infinite loop

This commit is contained in:
Nathan Sobo 2023-09-30 09:43:52 -06:00
parent 46b4118b9e
commit ef01a64826
3 changed files with 40 additions and 38 deletions

View file

@ -21,7 +21,6 @@ use smallvec::SmallVec;
use std::{
any::{type_name, Any, TypeId},
marker::PhantomData,
ops::{Deref, DerefMut},
sync::{Arc, Weak},
};
use util::ResultExt;
@ -220,7 +219,6 @@ impl<Thread: 'static + Send + Sync> AppContext<Thread> {
.unwrap();
let result = update(&mut WindowContext::mutable(cx.downcast_mut(), &mut window));
window.dirty = true;
cx.windows
.get_mut(id)
@ -266,7 +264,7 @@ impl<Thread: 'static + Send + Sync> AppContext<Thread> {
for dirty_window_id in dirty_window_ids {
self.update_window(dirty_window_id, |cx| cx.draw())
.unwrap() // We know we have the window.
.unwrap()
.log_err();
}
}