From a5b42ea97aaf29e9a4685d5fdc0d9815e548876d Mon Sep 17 00:00:00 2001 From: andrew Date: Tue, 21 Apr 2026 14:54:10 -0400 Subject: [PATCH] change: compile_article now takes references to pathbufs --- src/lib.rs | 4 ++-- src/main.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 8a68a64..a03e23d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -7,8 +7,8 @@ use typst_html::{HtmlAttr, HtmlDocument, HtmlElement, HtmlNode}; pub fn compile_article( - article_dir: PathBuf, - prepend: Option, + article_dir: &PathBuf, + prepend: &Option, ) -> Result<(), Box> { let template_file = article_dir.join("index.typ"); diff --git a/src/main.rs b/src/main.rs index db73559..b836b3f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -21,7 +21,7 @@ fn main() { let args = Args::parse(); - if let Err(e) = compile_article(args.dir, args.prepend) { + if let Err(e) = compile_article(&args.dir, &args.prepend) { eprintln!("{e}"); std::process::exit(1); }