I continue using mostly RoNode in my main code, since most of my traversals are read-only and the benefit is significant. I just ended up adding a handful of identical methods to both Node and RoNode and the redundancy is quite obvious+painful.
I think all of the read-only methods can be extracted out as a trait, and then have very simple default implementations for both structs:
impl NodeReader for Node {}
impl NodeReader for RoNode {}
and cut the code footprint in half. Not urgent, but definitely needed if the two structs are to coexist in peace going forward.
I continue using mostly
RoNode
in my main code, since most of my traversals are read-only and the benefit is significant. I just ended up adding a handful of identical methods to bothNode
andRoNode
and the redundancy is quite obvious+painful.I think all of the read-only methods can be extracted out as a trait, and then have very simple default implementations for both structs:
and cut the code footprint in half. Not urgent, but definitely needed if the two structs are to coexist in peace going forward.