Remix.run Logo
vlovich123 3 days ago

> The junior solution is .clone()

I really hope it’s an Rc/Arc that you’re cloning. Just deep cloning the value to get ownership is dangerous when you’re doing it blindly.

dev_l1x_be 2 days ago | parent [-]

Sure thing, this is why you need to learn what happens with copy and clone. Interestingly smaller problems are going to be ok even with clone(). The real value is to be able to spot potential performance optimizations by grep '(copy|clone)'.

vlovich123 2 days ago | parent [-]

How are you going to grep for copies? You know there’s no .copy method right?