Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Revert "chore: Bump taffy version to 0.4.3" (#11622)
Piotr Osiewiczf0af508ae5aa
diff --git a/Cargo.lock b/Cargo.lockindex bede039bf75..ed7d2208de2 100644--- a/Cargo.lock+++ b/Cargo.lock@@ -4674,9 +4674,9 @@ dependencies = [[[package]]name = "grid"-version = "0.13.0"+version = "0.11.0"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "d196ffc1627db18a531359249b2bf8416178d84b729f3cebeb278f285fb9b58c"+checksum = "1df00eed8d1f0db937f6be10e46e8072b0671accb504cf0f959c5c52c679f5b9"[[package]]name = "group"@@ -9920,14 +9920,12 @@ dependencies = [[[package]]name = "taffy"-version = "0.4.3"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "7b2e140b328c6cb5e744bb2c65910b47df86b239afc793ee2c52262569cf9225"+version = "0.3.11"+source = "git+https://github.com/DioxusLabs/taffy?rev=1876f72bee5e376023eaa518aa7b8a34c769bd1b#1876f72bee5e376023eaa518aa7b8a34c769bd1b"dependencies = ["arrayvec","grid","num-traits",- "serde","slotmap",]diff --git a/crates/gpui/Cargo.toml b/crates/gpui/Cargo.tomlindex f8ca20902bf..ed0e63f9db1 100644--- a/crates/gpui/Cargo.toml+++ b/crates/gpui/Cargo.toml@@ -61,7 +61,7 @@ slotmap = "1.0.6"smallvec.workspace = truesmol.workspace = truesum_tree.workspace = true-taffy = "0.4.3"+taffy = { git = "https://github.com/DioxusLabs/taffy", rev = "1876f72bee5e376023eaa518aa7b8a34c769bd1b" }thiserror.workspace = truetime.workspace = trueutil.workspace = truediff --git a/crates/gpui/src/taffy.rs b/crates/gpui/src/taffy.rsindex 16f887414e8..03ba16cd3e4 100644--- a/crates/gpui/src/taffy.rs+++ b/crates/gpui/src/taffy.rs@@ -9,14 +9,14 @@ use taffy::{geometry::{Point as TaffyPoint, Rect as TaffyRect, Size as TaffySize},style::AvailableSpace as TaffyAvailableSpace,tree::NodeId,- TaffyTree, TraversePartialTree as _,+ Taffy,};type NodeMeasureFn =Box<dyn FnMut(Size<Option<Pixels>>, Size<AvailableSpace>, &mut WindowContext) -> Size<Pixels>>;pub struct TaffyLayoutEngine {- taffy: TaffyTree<()>,+ taffy: Taffy,styles: FxHashMap<LayoutId, Style>,children_to_parents: FxHashMap<LayoutId, LayoutId>,absolute_layout_bounds: FxHashMap<LayoutId, Bounds<Pixels>>,@@ -29,7 +29,7 @@ static EXPECT_MESSAGE: &str = "we should avoid taffy layout errors by constructiimpl TaffyLayoutEngine {pub fn new() -> Self {TaffyLayoutEngine {- taffy: TaffyTree::new(),+ taffy: Taffy::new(),styles: FxHashMap::default(),children_to_parents: FxHashMap::default(),absolute_layout_bounds: FxHashMap::default(),@@ -114,7 +114,7 @@ impl TaffyLayoutEngine {fn max_depth(&self, depth: u32, parent: LayoutId) -> anyhow::Result<u32> {println!("{parent:?} at depth {depth} has {} children",- self.taffy.child_count(parent.0)+ self.taffy.child_count(parent.0)?);let mut max_child_depth = 0;