summaryrefslogtreecommitdiff
path: root/src/layout/par.rs
diff options
context:
space:
mode:
authorMartin Haug <mhaug@live.de>2021-06-29 12:33:24 +0200
committerMartin Haug <mhaug@live.de>2021-06-29 12:33:24 +0200
commit21d919e2d2a38802ba96003597eadb68342d71ef (patch)
tree9ec3dd8f08aa29456063ba478520254990578faa /src/layout/par.rs
parent8ea05739afdbe84fc50fe97d780cc6096d8df03d (diff)
Put incremental compilation behind feature
Diffstat (limited to 'src/layout/par.rs')
-rw-r--r--src/layout/par.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/layout/par.rs b/src/layout/par.rs
index 45eefe29..464853e0 100644
--- a/src/layout/par.rs
+++ b/src/layout/par.rs
@@ -11,7 +11,8 @@ use crate::util::{RangeExt, SliceExt};
type Range = std::ops::Range<usize>;
/// A node that arranges its children into a paragraph.
-#[derive(Debug, Clone, PartialEq, Hash)]
+#[derive(Debug, Clone, PartialEq)]
+#[cfg_attr(feature = "layout-cache", derive(Hash))]
pub struct ParNode {
/// The inline direction of this paragraph.
pub dir: Dir,
@@ -22,7 +23,8 @@ pub struct ParNode {
}
/// A child of a paragraph node.
-#[derive(Clone, PartialEq, Hash)]
+#[derive(Clone, PartialEq)]
+#[cfg_attr(feature = "layout-cache", derive(Hash))]
pub enum ParChild {
/// Spacing between other nodes.
Spacing(Length),