summaryrefslogtreecommitdiff
path: root/src/layout/par.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/layout/par.rs')
-rw-r--r--src/layout/par.rs11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/layout/par.rs b/src/layout/par.rs
index 64265b63..a645eb07 100644
--- a/src/layout/par.rs
+++ b/src/layout/par.rs
@@ -12,8 +12,7 @@ use crate::util::{EcoString, RangeExt, SliceExt};
type Range = std::ops::Range<usize>;
/// A node that arranges its children into a paragraph.
-#[derive(Debug)]
-#[cfg_attr(feature = "layout-cache", derive(Hash))]
+#[derive(Debug, Hash)]
pub struct ParNode {
/// The inline direction of this paragraph.
pub dir: Dir,
@@ -24,7 +23,7 @@ pub struct ParNode {
}
/// A child of a paragraph node.
-#[cfg_attr(feature = "layout-cache", derive(Hash))]
+#[derive(Hash)]
pub enum ParChild {
/// Spacing between other nodes.
Spacing(Spacing),
@@ -93,12 +92,6 @@ impl ParNode {
}
}
-impl From<ParNode> for BlockNode {
- fn from(node: ParNode) -> Self {
- Self::new(node)
- }
-}
-
impl Debug for ParChild {
fn fmt(&self, f: &mut Formatter) -> fmt::Result {
match self {