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 see the same pattern being used for explaining trait bounds. Is there any particular reason we don't seem to prefer references?
Personally, when I looked at these examples, I started asking questions like
why is this defined to move an object?
Is author trying to communicate that these methods can only be invoked once. If so, why?
I am more than happy to do the changes if anyone feels in the same manner and it improves readability.
Thanks.
The text was updated successfully, but these errors were encountered:
apatniv
changed the title
Traits Bound Syntax Example: Shouldn't be be using reference?
Traits Bound Syntax Example: Shouldn't we be using reference?
Nov 25, 2019
Yep, you're right that using references would be better. I think we didn't use them to try to reduce surrounding syntax. I'd accept a change that added references throughout the "traits as parameters" section!
In chapter ch10-02-traits.md,
notify
fn is defined as follow:instead of
I see the same pattern being used for explaining trait bounds. Is there any particular reason we don't seem to prefer references?
Personally, when I looked at these examples, I started asking questions like
I am more than happy to do the changes if anyone feels in the same manner and it improves readability.
Thanks.
The text was updated successfully, but these errors were encountered: