diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-01-03 00:12:09 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-01-03 00:12:09 +0100 |
| commit | aae67bd572ad86f4c57e364daa51a9dc883b8913 (patch) | |
| tree | 0aba021e0748ebad2197ea390385ec5f93ccbc6e /src/layout/spacing.rs | |
| parent | 1c40dc42e7bc7b799b77f06d25414aca59a044ba (diff) | |
Move and rename many things 🚛
Diffstat (limited to 'src/layout/spacing.rs')
| -rw-r--r-- | src/layout/spacing.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/layout/spacing.rs b/src/layout/spacing.rs index c9a9c233..f0024fab 100644 --- a/src/layout/spacing.rs +++ b/src/layout/spacing.rs @@ -5,7 +5,7 @@ use crate::eval::Softness; /// A spacing node. #[derive(Copy, Clone, PartialEq)] -pub struct Spacing { +pub struct NodeSpacing { /// The amount of spacing to insert. pub amount: Length, /// Defines how spacing interacts with surrounding spacing. @@ -19,13 +19,13 @@ pub struct Spacing { pub softness: Softness, } -impl Layout for Spacing { +impl Layout for NodeSpacing { fn layout(&self, _: &mut LayoutContext, _: &Areas) -> Layouted { Layouted::Spacing(self.amount) } } -impl Debug for Spacing { +impl Debug for NodeSpacing { fn fmt(&self, f: &mut Formatter) -> fmt::Result { match self.softness { Softness::Soft => write!(f, "Soft({})", self.amount), @@ -34,8 +34,8 @@ impl Debug for Spacing { } } -impl From<Spacing> for LayoutNode { - fn from(spacing: Spacing) -> Self { +impl From<NodeSpacing> for Node { + fn from(spacing: NodeSpacing) -> Self { Self::Spacing(spacing) } } |
