Skip to content

Commit

Permalink
Remove dead Direction type (#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
alice-i-cecile committed Jun 9, 2022
1 parent f644639 commit 724e286
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 20 deletions.
2 changes: 2 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
- more serious refactors are planned, and this will be challenging to keep working through that process
- if you are interested in helping us maintain bindings to other languages, [get in touch](https://github.com/DioxusLabs/sprawl/discussions)!
- the `serde_camel_case` and `serde_kebab_case` features have been removed: they were poorly motivated and were not correctly additive (if both were enabled compilation would fail)
- removed the `Direction` struct, and the corresponding `direction` field from `Style`
- this had no effect in the current code base and was actively misleading

## stretch2 0.4.3

Expand Down
4 changes: 2 additions & 2 deletions src/prelude.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ pub use crate::{
node::{Node, Sprawl},
number::Number,
style::{
AlignContent, AlignItems, AlignSelf, Dimension, Direction, Display, FlexDirection, FlexWrap, JustifyContent,
Overflow, PositionType, Style,
AlignContent, AlignItems, AlignSelf, Dimension, Display, FlexDirection, FlexWrap, JustifyContent, Overflow,
PositionType, Style,
},
Error,
};
18 changes: 0 additions & 18 deletions src/style.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,22 +51,6 @@ impl Default for AlignContent {
}
}

#[derive(Copy, Clone, PartialEq, Eq, Debug)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub enum Direction {
Inherit,
#[cfg_attr(feature = "serde", serde(rename = "ltr"))]
LTR,
#[cfg_attr(feature = "serde", serde(rename = "rtl"))]
RTL,
}

impl Default for Direction {
fn default() -> Self {
Self::Inherit
}
}

#[derive(Copy, Clone, PartialEq, Eq, Debug)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub enum Display {
Expand Down Expand Up @@ -219,7 +203,6 @@ impl Default for Size<Dimension> {
pub struct Style {
pub display: Display,
pub position_type: PositionType,
pub direction: Direction,
pub flex_direction: FlexDirection,
pub flex_wrap: FlexWrap,
pub overflow: Overflow,
Expand All @@ -245,7 +228,6 @@ impl Default for Style {
Self {
display: Default::default(),
position_type: Default::default(),
direction: Default::default(),
flex_direction: Default::default(),
flex_wrap: Default::default(),
overflow: Default::default(),
Expand Down

0 comments on commit 724e286

Please sign in to comment.