Skip to content

Commit

Permalink
fix(Page): Clone trait implemented for Page struct using fz_keep_page
Browse files Browse the repository at this point in the history
  • Loading branch information
monoamine11231 committed May 16, 2024
1 parent aef0aeb commit 387b002
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/page.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 387b002

Please sign in to comment.