Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove dead Direction type #111

Merged
merged 1 commit into from
Jun 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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