Skip to content

Commit

Permalink
Cleanup prelude (#415)
Browse files Browse the repository at this point in the history
  • Loading branch information
Weibye authored Apr 10, 2023
1 parent 0bccf6c commit c3b8fc5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 27 deletions.
4 changes: 4 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
27 changes: 0 additions & 27 deletions src/prelude.rs
Original file line number Diff line number Diff line change
@@ -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,
Expand Down

0 comments on commit c3b8fc5

Please sign in to comment.