From b97aef5f70ea10a6bc31220529b3f58f72ba6dfe Mon Sep 17 00:00:00 2001 From: monoamine11231 Date: Thu, 16 May 2024 19:50:53 +0200 Subject: [PATCH] fix(document): Implemented Clone Trait --- src/document.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/document.rs b/src/document.rs index 9388651..3ae7fcc 100644 --- a/src/document.rs +++ b/src/document.rs @@ -300,6 +300,12 @@ impl Drop for Document { } } +impl Clone for Document { + fn clone(&self) -> Self { + unsafe { Document::from_raw(fz_keep_document(context(), self.inner)) } + } +} + #[derive(Debug)] pub struct PageIter<'a> { index: i32,