Although ideally memory overhead would be minimal all the time, in practice there will always be some memory overhead from manipulating ropes, much like Vecs which allocate more capacity than their contents when pushing to them.
Let's add methods analogous to capacity() and shrink_to_fit() from Vec, which could be useful in some situations.
Although ideally memory overhead would be minimal all the time, in practice there will always be some memory overhead from manipulating ropes, much like
Vec
s which allocate more capacity than their contents when pushing to them.Let's add methods analogous to
capacity()
andshrink_to_fit()
fromVec
, which could be useful in some situations.