tawasuyu

tawasuyu/taffy

A high performance rust-powered UI layout library

HTML 5544Rust 88Markdown 11TOML 91926 Definiciones

Cleanup prelude (#415)

c3b8fc537376a5475944c6cdc9e53f405906d87e · por Andreas Weibye · (hace 3 años) · padre 0bccf6cb6 · ver el árbol en este commit

Delta semántico · 1

src/prelude.rs

2 archivos · +4 −27

diff --git a/RELEASES.md b/RELEASES.md
index 97a7ab4c4..ce4556c3e 100644
--- a/RELEASES.md
+++ b/RELEASES.md
@@ -2,6 +2,10 @@
 
 ## Unreleased
 
+### Removed
+
+- `layout_flexbox()` has been removed from the prelude. Use `FlexboxAlgorithm::perform_layout()` instead.
+
 ### Changes
 
 - The Flexbox algorithm has now been moved behind the `flexbox` feature. The `flexbox` feature is enabled by default.
diff --git a/src/prelude.rs b/src/prelude.rs
index 22a89a119..1b02ec6ed 100644
--- a/src/prelude.rs
+++ b/src/prelude.rs
@@ -1,32 +1,5 @@
 //! Commonly used types
 
-#[cfg(feature = "flexbox")]
-use crate::{
-    compute::LayoutAlgorithm,
-    layout::{SizeAndBaselines, SizingMode},
-};
-
-/// Apply the flexbox algorithm and recursively layout the specified node
-#[cfg(feature = "flexbox")]
-#[inline(always)]
-pub fn layout_flexbox(
-    tree: &mut impl LayoutTree,
-    node: Node,
-    known_dimensions: Size<Option<f32>>,
-    parent_size: Size<Option<f32>>,
-    available_space: Size<AvailableSpace>,
-    sizing_mode: SizingMode,
-) -> SizeAndBaselines {
-    crate::compute::flexbox::FlexboxAlgorithm::perform_layout(
-        tree,
-        node,
-        known_dimensions,
-        parent_size,
-        available_space,
-        sizing_mode,
-    )
-}
-
 pub use crate::{
     geometry::{Line, Rect, Size},
     layout::Layout,