summaryrefslogtreecommitdiff
path: root/src/layout/shape.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-10-26 17:11:08 +0200
committerLaurenz <laurmaedje@gmail.com>2021-10-26 17:14:11 +0200
commit5c534fb42881b508175dd25129f62e604bdae403 (patch)
treefab522708f55d3ee132cb7a0789de701b795d847 /src/layout/shape.rs
parentfb0cd3df6e1e1077c6f19c319726c9aa9678325b (diff)
Simplify node construction
Diffstat (limited to 'src/layout/shape.rs')
-rw-r--r--src/layout/shape.rs9
1 files changed, 1 insertions, 8 deletions
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<ShapeNode> for InlineNode {
- fn from(node: ShapeNode) -> Self {
- Self::new(node)
- }
-}