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 think that `ref` is not required in this example if Person.age is stored on the stack, as the definition of `age` copies the data instead of moving it. I have thus changed the code to store it on the heap, to illustrate the usefulness of `ref` in this context, and added a short explanation.
An alternative possibility could be to use `name` instead of `age` for the illustration; not sure which is clearer. Please feel free to edit or request edits to this PR if you see a clearer way!
0 commit comments