diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-08-29 17:59:56 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-08-29 18:01:18 +0200 |
| commit | 0e5c48ad0d04c22831e3b41c2904a24c7f5171cb (patch) | |
| tree | b2565d6188819a277791e315aeda31d824264372 /crates/typst-cli/src | |
| parent | a71a2057f286677b5bf2e064fea05024aeca0dd2 (diff) | |
Add a bit more docs to `compile`
Diffstat (limited to 'crates/typst-cli/src')
| -rw-r--r-- | crates/typst-cli/src/compile.rs | 4 | ||||
| -rw-r--r-- | crates/typst-cli/src/query.rs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/crates/typst-cli/src/compile.rs b/crates/typst-cli/src/compile.rs index 5ae569ba..c4800171 100644 --- a/crates/typst-cli/src/compile.rs +++ b/crates/typst-cli/src/compile.rs @@ -73,7 +73,7 @@ pub fn compile_once( world.reset(); world.source(world.main()).map_err(|err| err.to_string())?; - let mut tracer = Tracer::default(); + let mut tracer = Tracer::new(); let result = typst::compile(world, &mut tracer); let warnings = tracer.warnings(); @@ -218,7 +218,7 @@ pub fn print_diagnostics( config.display_style = term::DisplayStyle::Short; } - for diagnostic in warnings.iter().chain(errors.iter()) { + for diagnostic in warnings.iter().chain(errors) { let diag = match diagnostic.severity { Severity::Error => Diagnostic::error(), Severity::Warning => Diagnostic::warning(), diff --git a/crates/typst-cli/src/query.rs b/crates/typst-cli/src/query.rs index faf4e01b..bf02f49d 100644 --- a/crates/typst-cli/src/query.rs +++ b/crates/typst-cli/src/query.rs @@ -20,7 +20,7 @@ pub fn query(command: QueryCommand) -> StrResult<()> { world.reset(); world.source(world.main()).map_err(|err| err.to_string())?; - let mut tracer = Tracer::default(); + let mut tracer = Tracer::new(); let result = typst::compile(&world, &mut tracer); let warnings = tracer.warnings(); |
