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
Consider a case where a template XML is used to produce several other XMLs with different modifications; it seems that at this moment this requires the template to be parsed as many times as the number of desired target XMLs, because Package doesn't implement Clone and cloneing a Document merely copies the references to the parent Package, which doesn't provide a fresh copy of the parsed structure. Having to parse the same file several times is pretty inefficient - cloning Packages would be much faster.
I tried to #[derive(Clone)] for Package myself, but I encountered an issue: typed_arena::Arena isn't Cloneable either. Is there any way around this?
The text was updated successfully, but these errors were encountered:
Consider a case where a template XML is used to produce several other XMLs with different modifications; it seems that at this moment this requires the template to be parsed as many times as the number of desired target XMLs, because
Package
doesn't implementClone
andclone
ing aDocument
merely copies the references to the parentPackage
, which doesn't provide a fresh copy of the parsed structure. Having to parse the same file several times is pretty inefficient - cloningPackage
s would be much faster.I tried to
#[derive(Clone)]
forPackage
myself, but I encountered an issue:typed_arena::Arena
isn'tClone
able either. Is there any way around this?The text was updated successfully, but these errors were encountered: