diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-09-20 19:49:47 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-09-20 19:49:47 +0200 |
| commit | 3760748fddd3b793c79c370398a9d4a3fc5afc04 (patch) | |
| tree | b1a615e510aa231cfe9757a9c0a35a375e32e3ba /src/library/layout/stack.rs | |
| parent | 757a701c1aa2a6fb80033c7e75666661818da6f9 (diff) | |
Refactor error handling
Diffstat (limited to 'src/library/layout/stack.rs')
| -rw-r--r-- | src/library/layout/stack.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/library/layout/stack.rs b/src/library/layout/stack.rs index d07dc35e..a9fc1621 100644 --- a/src/library/layout/stack.rs +++ b/src/library/layout/stack.rs @@ -15,7 +15,7 @@ pub struct StackNode { #[node] impl StackNode { - fn construct(_: &mut Vm, args: &mut Args) -> TypResult<Content> { + fn construct(_: &mut Vm, args: &mut Args) -> SourceResult<Content> { Ok(Content::block(Self { dir: args.named("dir")?.unwrap_or(Dir::TTB), spacing: args.named("spacing")?, @@ -30,7 +30,7 @@ impl Layout for StackNode { world: &dyn World, regions: &Regions, styles: StyleChain, - ) -> TypResult<Vec<Frame>> { + ) -> SourceResult<Vec<Frame>> { let mut layouter = StackLayouter::new(self.dir, regions, styles); // Spacing to insert before the next node. @@ -171,7 +171,7 @@ impl<'a> StackLayouter<'a> { world: &dyn World, node: &LayoutNode, styles: StyleChain, - ) -> TypResult<()> { + ) -> SourceResult<()> { if self.regions.is_full() { self.finish_region(); } |
