diff --git a/src/bin/page_explorer.rs b/src/bin/page_explorer.rs index 9a942fd..0383640 100644 --- a/src/bin/page_explorer.rs +++ b/src/bin/page_explorer.rs @@ -179,8 +179,9 @@ impl PageExplorer { } } - if let Some(writer) = &mut self.output_writer { + if let Some(mut writer) = self.output_writer.take() { writer.end_array().expect("Can't end array"); + writer.finish_document().expect("Can't finish document"); } info!(