You don't have to copy the collection -- you even can't, since Clone
needs a &Vec
not a &Cell<Vec>
-- but you can swap in something else.
Reusing a recent conversation, one way is this:
You don't have to copy the collection -- you even can't, since Clone
needs a &Vec
not a &Cell<Vec>
-- but you can swap in something else.
Reusing a recent conversation, one way is this: