From 21d919e2d2a38802ba96003597eadb68342d71ef Mon Sep 17 00:00:00 2001 From: Martin Haug Date: Tue, 29 Jun 2021 12:33:24 +0200 Subject: Put incremental compilation behind feature --- src/layout/stack.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/layout/stack.rs') diff --git a/src/layout/stack.rs b/src/layout/stack.rs index fa5fd584..d8e30b2a 100644 --- a/src/layout/stack.rs +++ b/src/layout/stack.rs @@ -3,7 +3,8 @@ use decorum::N64; use super::*; /// A node that stacks its children. -#[derive(Debug, Clone, PartialEq, Hash)] +#[derive(Debug, Clone, PartialEq)] +#[cfg_attr(feature = "layout-cache", derive(Hash))] pub struct StackNode { /// The `main` and `cross` directions of this stack. /// @@ -19,7 +20,8 @@ pub struct StackNode { } /// A child of a stack node. -#[derive(Debug, Clone, PartialEq, Hash)] +#[derive(Debug, Clone, PartialEq)] +#[cfg_attr(feature = "layout-cache", derive(Hash))] pub enum StackChild { /// Spacing between other nodes. Spacing(Length), -- cgit v1.2.3