Skip to content

Commit

Permalink
Add extra feature flags for flexbox-specific code
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoburns committed Apr 10, 2023
1 parent dc8f39f commit 809b496
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/geometry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@ impl<T> Size<T> {
/// Creates a new value of type Self with the main axis modified by the callback provided
///
/// Whether this is the width or height depends on the `direction` provided
#[cfg(feature = "flexbox")]
pub(crate) fn map_main(self, direction: FlexDirection, mapper: impl FnOnce(T) -> T) -> Self {
let mut new = self;
if direction.is_row() {
Expand All @@ -360,6 +361,7 @@ impl<T> Size<T> {
/// Creates a new value of type Self with the cross axis modified by the callback provided
///
/// Whether this is the width or height depends on the `direction` provided
#[cfg(feature = "flexbox")]
pub(crate) fn map_cross(self, direction: FlexDirection, mapper: impl FnOnce(T) -> T) -> Self {
let mut new = self;
if direction.is_row() {
Expand Down

0 comments on commit 809b496

Please sign in to comment.