summaryrefslogtreecommitdiff
path: root/src/model/realize.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2022-12-05 12:21:10 +0100
committerLaurenz <laurmaedje@gmail.com>2022-12-05 12:21:10 +0100
commit1d324235bd80fe8d1fb21b1e73ae9e3dfe918078 (patch)
tree342b3ad9f0ca40dbf6f51c2b29646ca6803fe85a /src/model/realize.rs
parent1bb05677faa7bd6566e1231ed2b16547f476b143 (diff)
Make show rule fallible again
Diffstat (limited to 'src/model/realize.rs')
-rw-r--r--src/model/realize.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/model/realize.rs b/src/model/realize.rs
index abe20901..b4e38e30 100644
--- a/src/model/realize.rs
+++ b/src/model/realize.rs
@@ -47,7 +47,7 @@ pub fn realize(
if let Some(showable) = target.with::<dyn Show>() {
let guard = Guard::Base(target.id());
if realized.is_none() && !target.is_guarded(guard) {
- realized = Some(showable.show(vt, target, styles));
+ realized = Some(showable.show(vt, target, styles)?);
}
}
@@ -139,7 +139,12 @@ pub trait Prepare {
#[capability]
pub trait Show {
/// Execute the base recipe for this node.
- fn show(&self, vt: &mut Vt, this: &Content, styles: StyleChain) -> Content;
+ fn show(
+ &self,
+ vt: &mut Vt,
+ this: &Content,
+ styles: StyleChain,
+ ) -> SourceResult<Content>;
}
/// Post-process a node after it was realized.