-
Notifications
You must be signed in to change notification settings - Fork 383
Use coercion for arguments #29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@lfairy Does this look fine to you? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks pretty much good to me, modulo the comments above.
I wonder if this article should be about borrowed types in general (e.g. talk about Vec<T>
and &[T]
as well), but if you think &String
is common enough to deserve its own article then that's fine.
This is a good point. Let me think about that. |
Describe some of the reasons it is considered idiomatic to use `&str` over `&String` in most cases.
4c8e651
to
366db72
Compare
Co-authored-by: Marco Ieni <11428655+MarcoIeni@users.noreply.github.com>
Co-authored-by: Marco Ieni <11428655+MarcoIeni@users.noreply.github.com>
Other than the 2 open suggestions I've made it looks good to me. |
Co-authored-by: Marco Ieni <11428655+MarcoIeni@users.noreply.github.com>
Co-authored-by: Ivan Tham <pickfire@riseup.net>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM modulo comments
Co-authored-by: Chris Wong <lambda.fairy@gmail.com>
Co-authored-by: Chris Wong <lambda.fairy@gmail.com>
That was a ride 🎢 🙄 :-D |
Thanks for the PR @cbreeden ;-) |
Describe some of the reasons it is considered idiomatic to use
&str
over&String
in most cases.ref.: #27