summaryrefslogtreecommitdiff
path: root/src/eval/content.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2022-03-12 14:24:24 +0100
committerLaurenz <laurmaedje@gmail.com>2022-03-12 14:24:24 +0100
commit2890a156d27c02a101137bf01dc2046597110bd1 (patch)
treec6bdeb48242c0fbd5b5e13120ca3c8f502d41b75 /src/eval/content.rs
parent5ac7eb3860ebd3247f6486c227e816894cb8fd91 (diff)
Remove classes and improve naming
Diffstat (limited to 'src/eval/content.rs')
-rw-r--r--src/eval/content.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/eval/content.rs b/src/eval/content.rs
index b6d60957..5f8c5861 100644
--- a/src/eval/content.rs
+++ b/src/eval/content.rs
@@ -6,11 +6,11 @@ use std::ops::{Add, AddAssign};
use typed_arena::Arena;
use super::{
- CollapsingBuilder, Interruption, Layout, LayoutNode, Property, Show, ShowNode,
- StyleMap, StyleVecBuilder,
+ CollapsingBuilder, Interruption, Key, Layout, LayoutNode, Show, ShowNode, StyleMap,
+ StyleVecBuilder,
};
use crate::diag::StrResult;
-use crate::library::layout::{FlowChild, FlowNode, PageNode, PlaceNode, SpacingKind};
+use crate::library::layout::{FlowChild, FlowNode, PageNode, PlaceNode, Spacing};
use crate::library::prelude::*;
use crate::library::structure::{ListItem, ListKind, ListNode, ORDERED, UNORDERED};
use crate::library::text::{DecoNode, ParChild, ParNode, TextNode, UNDERLINE};
@@ -42,7 +42,7 @@ pub enum Content {
/// A line break.
Linebreak,
/// Horizontal spacing.
- Horizontal(SpacingKind),
+ Horizontal(Spacing),
/// Plain text.
Text(EcoString),
/// An inline-level node.
@@ -52,7 +52,7 @@ pub enum Content {
/// A column break.
Colbreak,
/// Vertical spacing.
- Vertical(SpacingKind),
+ Vertical(Spacing),
/// A block-level node.
Block(LayoutNode),
/// An item in an unordered list.
@@ -102,7 +102,7 @@ impl Content {
}
/// Style this content with a single style property.
- pub fn styled<P: Property>(mut self, key: P, value: P::Value) -> Self {
+ pub fn styled<P: Key>(mut self, key: P, value: P::Value) -> Self {
if let Self::Styled(styled) = &mut self {
if let Some((_, map)) = Arc::get_mut(styled) {
if !map.has_scoped() {
@@ -465,7 +465,7 @@ impl<'a> Builder<'a> {
})
.unwrap_or_default()
{
- par.push_front(ParChild::Spacing(SpacingKind::Linear(indent)))
+ par.push_front(ParChild::Spacing(Spacing::Linear(indent)))
}
let node = ParNode(par).pack();