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/pad.rs | |
| parent | fb0cd3df6e1e1077c6f19c319726c9aa9678325b (diff) | |
Simplify node construction
Diffstat (limited to 'src/layout/pad.rs')
| -rw-r--r-- | src/layout/pad.rs | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/layout/pad.rs b/src/layout/pad.rs index 20fcc161..55c11e45 100644 --- a/src/layout/pad.rs +++ b/src/layout/pad.rs @@ -1,8 +1,7 @@ use super::*; /// A node that adds padding to its child. -#[derive(Debug)] -#[cfg_attr(feature = "layout-cache", derive(Hash))] +#[derive(Debug, Hash)] pub struct PadNode { /// The amount of padding. pub padding: Sides<Linear>, @@ -74,9 +73,3 @@ impl BlockLevel for PadNode { frames } } - -impl From<PadNode> for BlockNode { - fn from(node: PadNode) -> Self { - Self::new(node) - } -} |
