diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-06-14 20:07:27 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-06-14 20:07:27 +0200 |
| commit | 7fb19d5ef8dc3b183d7de811e373768de56f7ee8 (patch) | |
| tree | 885a94958e8270615aa57069b4d07db82e534b2c /src/main.rs | |
| parent | 0dacb2d151e1790613b324b3051b8ce7aa26a90e (diff) | |
Unified file loading errors
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 5 |
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) { |
