DEV Community

Discussion on: No More Tears, No More Knots: Arena-Allocated Trees in Rust

Collapse
 
dydokamil profile image
Kamil Dydo • Edited

When creating a node you're setting idx to be the length of the current Vec of children. If you then remove the one before last element and create another one at the end 2 last elements will have the same index.