Uh oh!
There was an error while loading. Please reload this page.
impl FromIterator<&char> for String - #40028
Conversation
Was sad to observe that this impl is not backwards compatible: impl<T>FromIterator<T>forStringwhereString:Extend<T>{fnfrom_iter<I:Iterator<Item = T>>(iter:I) -> String{letmut string = String::new();
string.extend(iter);
string
}}Nor this even more useful impl: // something something monoidimpl<T,C>FromIterator<T>forCwhereC:Default + Extend<T>{fnfrom_iter<I:Iterator<Item = T>>(iter:I) -> String{letmut collection = C::default();
collection.extend(iter);
collection
}} |
alexcrichton
commented
Feb 22, 2017
@rfcbot fcp merge Looks good to me! |
Team member @alexcrichton has proposed to merge this. The next step is review by the rest of the tagged teams: No concerns currently listed. Once these reviewers reach consensus, this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
sfackler
commented
Feb 24, 2017
Do we do this kind of implicit dereference elsewhere? Can I for example collect an |
@sfackler we implement But I also would definitely support |
ollie27
commented
Feb 25, 2017
If I also think there should be parity between |
withoutboats
commented
Feb 25, 2017
I can add that impl to this PR.
(Note there's no extend impl so there's no parity in that case). That impl would need a crater run, but I have trouble imagining code that would not have enough contextual information to distinguish a |
alexcrichton
commented
Feb 27, 2017
sfackler
commented
Feb 27, 2017
TIL |
rfcbot
commented
Feb 28, 2017
🔔 This is now entering its final comment period, as per the review above. 🔔 |
alexcrichton
commented
Feb 28, 2017
@bors: r+ |
bors
commented
Feb 28, 2017
📌 Commit 097398e has been approved by |
withoutboats
commented
Feb 28, 2017
I'll try to remember to put up another PR for the Cow impl |
…excrichton impl FromIterator<&char> for String
cuviper
commented
Apr 27, 2017
AFAICS, that impl is only used for its |
alexcrichton
commented
Apr 27, 2017
Oh sorry I was thinking of this impl, namely: impl<'a,T:'a + Copy>Extend<&'aT>forVec<T>{I forgot that it was only |
alexcrichton
commented
Apr 27, 2017
Unfortunately this was just released though so we don't have much time to rethink the merge... |
cuviper
commented
Apr 27, 2017
Yeah, I only got here because of the release notes. |
No description provided.