You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using rust-lldb I was able to verify that initializing a Vec with QPdf::empty() set all elements of the Vec to use the same pointer in the Handler, or specifically whatever is pointed to by qpdf_sys::qpdf_init()
The text was updated successfully, but these errors were encountered:
Yeah, the vec! macro expects that the element has a Clone implementation. The QPdf structure has a reference-counted internal handle and a cheap "clone" operation so it can be easily passed over as a function parameter, pointing to the same data. This was originally by design, which unfortunately has this side-effect when constructing a Vec.
I am not sure how to resolve it easily.
Something about this code isn't working well with the way that
QPdf::empty()
is implemented:What does work is initializing each element of the Vec using separate QPdf::empty() calls:
Using
rust-lldb
I was able to verify that initializing a Vec withQPdf::empty()
set all elements of the Vec to use the same pointer in theHandler
, or specifically whatever is pointed to byqpdf_sys::qpdf_init()
The text was updated successfully, but these errors were encountered: