It looks like #12 and #13 said that rewrite_segment should remove the handle passed as end, and the doc comment seems to suggest so as well. However, in practice, at least for HashGraph and (I think) vg::VG, the end is treated as a past-end. Here's HashGraph not removing the end step:
In order to allow for pure insertion operations, the end has to be treated as a past-end, so maybe that's why it is being done this way.
We should make sure all the implementations use a past-end, and update the documentation. Alternately, if what's documented right now is what we really want, I think we need to modify at least HashGraph and vg::VG, and maybe other implementations.
It looks like #12 and #13 said that rewrite_segment should remove the handle passed as end, and the doc comment seems to suggest so as well. However, in practice, at least for HashGraph and (I think) vg::VG, the end is treated as a past-end. Here's HashGraph not removing the end step:
https://github.com/vgteam/libbdsg/blob/7b913da50dc70bf2b4b301e1226a6586e27892bc/src/hash_graph.cpp#L524-L542
In order to allow for pure insertion operations, the end has to be treated as a past-end, so maybe that's why it is being done this way.
We should make sure all the implementations use a past-end, and update the documentation. Alternately, if what's documented right now is what we really want, I think we need to modify at least HashGraph and vg::VG, and maybe other implementations.