diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-06-30 00:43:53 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-06-30 00:43:53 +0200 |
| commit | d5d2b80699a002594f429e30f5f1ca0ca58d3412 (patch) | |
| tree | 15e0f0565d4aa7c8230cb76b057b99761788c86c /src/layout/par.rs | |
| parent | 2f44d10aa4209b226cfc3d0f8f2c8516005edf6a (diff) | |
| parent | ff0e3442ef68a23dba273122f3ba0a54a34c45bf (diff) | |
Merge pull request #34 from typst/cfg-conditional
Put incremental compilation behind feature
Diffstat (limited to 'src/layout/par.rs')
| -rw-r--r-- | src/layout/par.rs | 6 |
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), |
