diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-10-26 17:11:08 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-10-26 17:14:11 +0200 |
| commit | 5c534fb42881b508175dd25129f62e604bdae403 (patch) | |
| tree | fab522708f55d3ee132cb7a0789de701b795d847 /src/layout/grid.rs | |
| parent | fb0cd3df6e1e1077c6f19c319726c9aa9678325b (diff) | |
Simplify node construction
Diffstat (limited to 'src/layout/grid.rs')
| -rw-r--r-- | src/layout/grid.rs | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/layout/grid.rs b/src/layout/grid.rs index 7220d7c2..57986b48 100644 --- a/src/layout/grid.rs +++ b/src/layout/grid.rs @@ -1,8 +1,7 @@ use super::*; /// A node that arranges its children in a grid. -#[derive(Debug)] -#[cfg_attr(feature = "layout-cache", derive(Hash))] +#[derive(Debug, Hash)] pub struct GridNode { /// Defines sizing for content rows and columns. pub tracks: Spec<Vec<TrackSizing>>, @@ -40,12 +39,6 @@ impl BlockLevel for GridNode { } } -impl From<GridNode> for BlockNode { - fn from(node: GridNode) -> Self { - Self::new(node) - } -} - /// Performs grid layout. struct GridLayouter<'a> { /// The original expand state of the target region. |
