Purpose of Arc in Multiaddr
i was searching for why Arc was used after my overnight test shown additional allocation tracing back to the Arc in Multiaddr (probably unrelated, though it did catch my eye). The previous commit that made the change did not mention the reason for using it, and looking over the code, removing the Arc should work just fine and without being a breaking change.
I believe the idea is that it is cheap to clone. The Multiaddr::push function for example uses clone-on-write to either reuse the current allocation if there are no other copies or make a new one on the fly.
I've made pull request #89 to preserve the cheap clone while making the semantics clearer and improving (hopefully, still benchmarking) efficiency by using an EcoVec<u8>, downside is it adds a dependency on https://github.com/typst/ecow