diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-02-02 16:02:23 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-02-02 16:02:23 +0100 |
| commit | a7b403fd742941f6b163f06876aec96729db707f (patch) | |
| tree | b5062eddbcb814713b65f59d3f59dfe7e2bcaca8 /src/library/columns.rs | |
| parent | 0a1916c1e4259aff1306b26c06d4edcf0f190a3b (diff) | |
Rename `Node` to `Template`
Diffstat (limited to 'src/library/columns.rs')
| -rw-r--r-- | src/library/columns.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/library/columns.rs b/src/library/columns.rs index 5ea76973..9e696b49 100644 --- a/src/library/columns.rs +++ b/src/library/columns.rs @@ -3,7 +3,7 @@ use super::prelude::*; use super::ParNode; -/// A node that separates a region into multiple equally sized columns. +/// Separate a region into multiple equally sized columns. #[derive(Debug, Hash)] pub struct ColumnsNode { /// How many columns there should be. @@ -18,8 +18,8 @@ impl ColumnsNode { /// The size of the gutter space between each column. pub const GUTTER: Linear = Relative::new(0.04).into(); - fn construct(_: &mut EvalContext, args: &mut Args) -> TypResult<Node> { - Ok(Node::block(Self { + fn construct(_: &mut EvalContext, args: &mut Args) -> TypResult<Template> { + Ok(Template::block(Self { columns: args.expect("column count")?, child: args.expect("body")?, })) @@ -116,7 +116,7 @@ pub struct ColbreakNode; #[class] impl ColbreakNode { - fn construct(_: &mut EvalContext, _: &mut Args) -> TypResult<Node> { - Ok(Node::Colbreak) + fn construct(_: &mut EvalContext, _: &mut Args) -> TypResult<Template> { + Ok(Template::Colbreak) } } |
