diff options
| author | Laurenz <laurmaedje@gmail.com> | 2020-11-19 23:46:51 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2020-11-19 23:46:51 +0100 |
| commit | 2e6e6244ccf73795d7d74cbc286fb0b43b404315 (patch) | |
| tree | 74357df3e7bd2a9b7955d912ef531d4b15e0520f /tests | |
| parent | 3a7bfd6bed9a932693588ca3cb61b101f8808783 (diff) | |
Switch to pdf-writer ⬆️
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/typeset.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/typeset.rs b/tests/typeset.rs index b3080a52..90e0d4fb 100644 --- a/tests/typeset.rs +++ b/tests/typeset.rs @@ -2,7 +2,6 @@ use std::cell::RefCell; use std::env; use std::ffi::OsStr; use std::fs::{self, File}; -use std::io::BufWriter; use std::path::Path; use std::rc::Rc; @@ -135,8 +134,8 @@ fn test(src_path: &Path, pdf_path: &Path, png_path: &Path, loader: &SharedFontLo let surface = render(&layouts, &loader, 3.0); surface.write_png(png_path).unwrap(); - let file = BufWriter::new(File::create(pdf_path).unwrap()); - pdf::export(&layouts, &loader, file).unwrap(); + let pdf_data = pdf::export(&layouts, &loader); + fs::write(pdf_path, pdf_data).unwrap(); } struct TestFilter { |
