implement FromIterator<char> for Box<str>#65168
implement FromIterator<char> for Box<str>#65168Duddino wants to merge 12 commits intorust-lang:masterfrom Duddino:master
Conversation
|
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @TimNN (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. |
|
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
|
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
src/liballoc/boxed.rs
Outdated
| let mut buf = String::new(); | ||
| buf.extend(iter); | ||
| buf.into_boxed_str() |
There was a problem hiding this comment.
Can the string creation reuse String::from_iter?
String::from_iter(iter).into_boxed_str()|
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
|
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
|
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
|
Re-assigning to the libs team: r? @KodrAus |
src/liballoc/boxed.rs
Outdated
| } | ||
| } | ||
|
|
||
| #[unstable(feature = "box_str_from_iter", issue = "0")] |
There was a problem hiding this comment.
impls are going to be insta-stable, you can probably make this just be stable with the same feature name
|
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
|
What should I write for "since"? 1.39.0 doesn't work |
|
It should be 1.40.0 |
|
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
|
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
|
Ping from Triage: any update @Duddino? |
|
I'm going to fix it later this day |
|
|
||
| #[test] | ||
| fn box_str_from_iter(){ | ||
| let iter = (0..100).map(|_|{'☺'}); |
| //! | ||
| //! # Examples | ||
| //! | ||
| //! A pointer type for heap allocation. |
There was a problem hiding this comment.
It looks like our docs might still be a little confused here, because they've changed on master since you fixed them up.
Would you like to try squashing your 12 commits down and rebase on master?
|
Box is |
|
@sfackler that should only be a concern for generic impls, because it could break downstream crates. This should be fine because it is just for |
|
Unfortunately this PR has sat idle for awhile and I'm closing this as inactive |
Sorry in advance if I did something wrong, it's my first pull request