From 387b002dfa664df4ad69516dbe260242ae8e256f Mon Sep 17 00:00:00 2001 From: monoamine11231 Date: Thu, 16 May 2024 16:55:09 +0200 Subject: [PATCH] fix(Page): Clone trait implemented for Page struct using fz_keep_page --- src/page.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/page.rs b/src/page.rs index 111c1ea..455f9f7 100644 --- a/src/page.rs +++ b/src/page.rs @@ -337,6 +337,12 @@ impl Drop for Page { } } +impl Clone for Page { + fn clone(&self) -> Self { + unsafe { Page::from_raw(fz_keep_page(context(), self.inner)) } + } +} + #[derive(Debug)] pub struct LinkIter { next: *mut fz_link,