summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/main.rs b/src/main.rs
index 2f31d135..784dbc2d 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -206,10 +206,7 @@ fn typeset(command: TypesetCommand) -> StrResult<()> {
let mut ctx = Context::new(Arc::new(loader), config.build());
// Load the source file.
- let id = ctx
- .sources
- .load(&command.input)
- .map_err(|_| "failed to load source file")?;
+ let id = ctx.sources.load(&command.input)?;
// Typeset.
match typst::typeset(&mut ctx, id) {