diff options
author | Lars Wirzenius <liw@liw.fi> | 2023-06-15 07:56:32 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2023-06-15 07:56:32 +0300 |
commit | 8802069892c3835181cb506d0deba91eacce225a (patch) | |
tree | 3583752bf424a34c0cc36278cfdb9476adcdd20a /src/bin/subplot.rs | |
parent | 9f2198d7c6d323b04d2d6a2ee6bf1cc421a91de5 (diff) | |
download | subplot-8802069892c3835181cb506d0deba91eacce225a.tar.gz |
refactor: change Document::to_html to return a Result
HTML generation uses write!, which can fail, so to_html must return a
Result.
Sponsored-by: author
Diffstat (limited to 'src/bin/subplot.rs')
-rw-r--r-- | src/bin/subplot.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bin/subplot.rs b/src/bin/subplot.rs index ca1ef5d..ced34cc 100644 --- a/src/bin/subplot.rs +++ b/src/bin/subplot.rs @@ -285,7 +285,7 @@ impl Docgen { }; doc.typeset(&mut Warnings::default()); - std::fs::write(&self.output, doc.to_html(&date)) + std::fs::write(&self.output, doc.to_html(&date)?) .map_err(|e| SubplotError::WriteFile(self.output.clone(), e))?; Ok(()) |