Switch Arc<Mutex<Keymap>> to Rc<RefCell<Keymap>>, a relic of the GPUI2 port.

Make gpui pass clippy
This commit is contained in:
Mikayla 2024-01-21 15:35:47 -08:00
parent ba5b969e10
commit 1f94463ce2
No known key found for this signature in database
22 changed files with 75 additions and 72 deletions

View file

@ -12,22 +12,16 @@ use taffy::{
Taffy,
};
type NodeMeasureFn =
Box<dyn FnMut(Size<Option<Pixels>>, Size<AvailableSpace>, &mut WindowContext) -> Size<Pixels>>;
pub struct TaffyLayoutEngine {
taffy: Taffy,
styles: FxHashMap<LayoutId, Style>,
children_to_parents: FxHashMap<LayoutId, LayoutId>,
absolute_layout_bounds: FxHashMap<LayoutId, Bounds<Pixels>>,
computed_layouts: FxHashSet<LayoutId>,
nodes_to_measure: FxHashMap<
LayoutId,
Box<
dyn FnMut(
Size<Option<Pixels>>,
Size<AvailableSpace>,
&mut WindowContext,
) -> Size<Pixels>,
>,
>,
nodes_to_measure: FxHashMap<LayoutId, NodeMeasureFn>,
}
static EXPECT_MESSAGE: &str = "we should avoid taffy layout errors by construction if possible";