From 5c534fb42881b508175dd25129f62e604bdae403 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Tue, 26 Oct 2021 17:11:08 +0200 Subject: Simplify node construction --- src/layout/shape.rs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'src/layout/shape.rs') diff --git a/src/layout/shape.rs b/src/layout/shape.rs index 2e66a0dd..ed70dd95 100644 --- a/src/layout/shape.rs +++ b/src/layout/shape.rs @@ -4,8 +4,7 @@ use super::*; use crate::util::RcExt; /// Places its child into a sizable and fillable shape. -#[derive(Debug)] -#[cfg_attr(feature = "layout-cache", derive(Hash))] +#[derive(Debug, Hash)] pub struct ShapeNode { /// Which shape to place the child into. pub shape: ShapeKind, @@ -105,9 +104,3 @@ impl InlineLevel for ShapeNode { frame } } - -impl From for InlineNode { - fn from(node: ShapeNode) -> Self { - Self::new(node) - } -} -- cgit v1.2.3