7 ms·
> It seems like either one evaluates the contents of the `box`, and would only make a difference if you tried to use `x` afterwards? More or less. x^ moves the
by jamii 5mo ago
> It seems like either one evaluates the contents of the `box`, and would only make a difference if you tried to use `x` afterwards?
More or less. x^ moves the whole box whereas x* copies the contents of the box.
> Awkwardly, it also hasn't been assigned so I'm not sure the box is accessible anymore?
Yes, if you move something and don't assign it then it gets dropped, same as rust.
- drabbiticus 5mo agoGreat, thanks for the clarification!