-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Add FromIterator
implementations for Cow<str>
#35064
Add FromIterator
implementations for Cow<str>
#35064
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @aturon (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
Would be nice to have an but I guess the ship has sailed on that already |
@rphmeier Wouldn't that be a strict generalization of every current |
ab328e5
to
61ff591
Compare
@@ -274,3 +274,13 @@ impl<'a, T: ?Sized + ToOwned> AsRef<T> for Cow<'a, T> { | |||
self | |||
} | |||
} | |||
|
|||
// // Generic implementation mentioned in |
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.
Could we get rid of this dead code?
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.
I had included it because of @rphmeier's earlier comment, but I can remove it again.
Could you remove the commented out implementation and squash down to one commit? We should be good to merge once that happens. |
61ff591
to
010e024
Compare
@sfackler Done! |
010e024
to
31d968c
Compare
@sfackler Any word? |
This seems like an oversight, since the corresponding implementation for `Cow<[T]> where T: Clone` exists.
31d968c
to
42e64bc
Compare
Discussed at libs traige this this past week the decision was to merge, thanks for the PR @pthariensflame! |
@alexcrichton Thanks! |
…excrichton Add `FromIterator` implementations for `Cow<str>` This seems like an oversight, since the corresponding implementation for `Cow<[T]> where T: Clone` exists.
This seems like an oversight, since the corresponding implementation for
Cow<[T]> where T: Clone
exists.