You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am not convinced about the split into mut/non-mut structures. Keeping all the methods on a single structure is both simpler to implement and easier to use. The only pro I can see for keeping it separate is that it makes it more explicit when mutating is done, however since Rust already forces the user to be explicit about mutating that is already encoded at the call site.
My main motivation for the separation is conceptual (having neat API, separation of two different paradigms). But I have to say that the maintenance burden of doing this separation starts to outweight the conceptual neatness I was looking for. I will follow your suggestion and not split them.
orium
changed the title
Mutable implementations of the data structures
Mutable methods for all data structures
Apr 1, 2018
These can use
{Rc,Arc}::make_mut()
that can speed up things a lot if there is not a lot of structural sharing.List
Vector
Stack
Queue
HashTrieMap
HashTrieSet
RedBlackTreeMap
RedBlackTreeSet
README.md
The text was updated successfully, but these errors were encountered: