Repository navigation
stabilize String::into_chars - #163816
stabilize String::into_chars#163816
Conversation
|
Huh? |
|
Probably desirable to @rfcbot merge libs |
|
@clarfonthey has proposed to merge this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), 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! cc @rust-lang/libs-ping: FCP proposed for libs, please feel free to register concerns. |
| pub struct IntoChars { | ||
| bytes: vec::IntoIter<u8>, | ||
| } |
There was a problem hiding this comment.
Since this is just a wrapper over vec::IntoIter, we could pretty easily derive(Clone) and support it. I would say that's useful since cloning iterators is pretty useful for debugging, even if it would allocate a copy here.
There was a problem hiding this comment.
Doesn't it already have Clone?
#[cfg_attr(not(no_global_oom_handling), derive(Clone))]Or did you mean that it should always derive(Clone)?
There was a problem hiding this comment.
Oh, I totally missed that line. You just didn't include it in the public API in the description is why I was confused.
There was a problem hiding this comment.
Sorry, I just copied the output from cargo unstable-api which didn't include the clone 😅 It's probably because it was in #[cfg_attr].
|
I admit I felt a bit "meh" about this when I initially saw it but after looking at the motivation in the ACP, I think this is reasonable. And the tracking issue does seem to have gained some interest so there's at least some demand. So +1 from me. |
|
🔔 This is now entering its final comment period, as per the review above. 🔔 |
|
r=me pending FCP |
|
The final comment period, with a disposition to merge, as per the review above, is now complete. As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed. |
|
@bors r=@clarfonthey rollup |
…rs, r=clarfonthey stabilize String::into_chars Closes rust-lang#133125 #### History Implementation: rust-lang#133057 #### Public API ```rs impl String { pub fn into_chars(self) -> IntoChars { .. } } #[cfg_attr(not(no_global_oom_handling), derive(Clone))] pub struct IntoChars {} impl fmt::Debug for IntoChars {} impl IntoChars { pub fn as_str(&self) -> &str { .. } pub fn into_string(self) -> String { .. } } impl Iterator for IntoChars {} impl DoubleEndedIterator for IntoChars {} impl FusedIterator for IntoChars {} ``` @rustbot modify labels: +T-libs No unresolved questions so, hoping to get a FCP started ^^
…rs, r=clarfonthey stabilize String::into_chars Closes rust-lang#133125 #### History Implementation: rust-lang#133057 #### Public API ```rs impl String { pub fn into_chars(self) -> IntoChars { .. } } #[cfg_attr(not(no_global_oom_handling), derive(Clone))] pub struct IntoChars {} impl fmt::Debug for IntoChars {} impl IntoChars { pub fn as_str(&self) -> &str { .. } pub fn into_string(self) -> String { .. } } impl Iterator for IntoChars {} impl DoubleEndedIterator for IntoChars {} impl FusedIterator for IntoChars {} ``` @rustbot modify labels: +T-libs No unresolved questions so, hoping to get a FCP started ^^
…uwer Rollup of 20 pull requests Successful merges: - #163730 (add tests over re-entrancy guarantees for 160776) - #164834 (miri subtree update) - #164849 (Use the span of the doctest code block fence for figuring out the line number) - #164883 (rustdoc: don't panic on a nested use group with no path prefix) - #164890 (Store cold blocks in a bitset instead of a Vec of bools) - #163458 (stabilize {Rc, Arc}::is_unique) - #163499 (vec: stabilise allocators for into_iter) - #163805 (std: check `SO_ERROR` after poll in `TcpStream::connect_timeout`) - #163816 (stabilize String::into_chars) - #163819 (Correct documentation of what `core::ops::Code` is.) - #163847 (add regression test for reborrow-invariant-type) - #164006 (Arduously fix typo) - #164009 (Update `Ready` future expect messages) - #164522 (Add IPv6 hop limit stubs to the motor OS net backend) - #164602 (Improve seek_read_buf_exact() test coverage to match seek_read_exact()) - #164772 (docs: Two nitpick changes to `HashMap`, `BTreeMap` Entry API docs) - #164794 (Expose FloatErrorKind) - #164802 (Migrate stable-specific run-make tests to UI tests) - #164899 (Only recover if we may in `parse_expr_tuple_parens`) - #164903 (rustc-dev-guide subtree update) Failed merges: - #164856 (Switch from `insta` to `expect-test` in bootstrap)
Rollup merge of #163816 - malezjaa:stabilize-String-into-chars, r=clarfonthey stabilize String::into_chars Closes #133125 #### History Implementation: #133057 #### Public API ```rs impl String { pub fn into_chars(self) -> IntoChars { .. } } #[cfg_attr(not(no_global_oom_handling), derive(Clone))] pub struct IntoChars {} impl fmt::Debug for IntoChars {} impl IntoChars { pub fn as_str(&self) -> &str { .. } pub fn into_string(self) -> String { .. } } impl Iterator for IntoChars {} impl DoubleEndedIterator for IntoChars {} impl FusedIterator for IntoChars {} ``` @rustbot modify labels: +T-libs No unresolved questions so, hoping to get a FCP started ^^
…uwer Rollup of 20 pull requests Successful merges: - rust-lang/rust#163730 (add tests over re-entrancy guarantees for 160776) - rust-lang/rust#164834 (miri subtree update) - rust-lang/rust#164849 (Use the span of the doctest code block fence for figuring out the line number) - rust-lang/rust#164883 (rustdoc: don't panic on a nested use group with no path prefix) - rust-lang/rust#164890 (Store cold blocks in a bitset instead of a Vec of bools) - rust-lang/rust#163458 (stabilize {Rc, Arc}::is_unique) - rust-lang/rust#163499 (vec: stabilise allocators for into_iter) - rust-lang/rust#163805 (std: check `SO_ERROR` after poll in `TcpStream::connect_timeout`) - rust-lang/rust#163816 (stabilize String::into_chars) - rust-lang/rust#163819 (Correct documentation of what `core::ops::Code` is.) - rust-lang/rust#163847 (add regression test for reborrow-invariant-type) - rust-lang/rust#164006 (Arduously fix typo) - rust-lang/rust#164009 (Update `Ready` future expect messages) - rust-lang/rust#164522 (Add IPv6 hop limit stubs to the motor OS net backend) - rust-lang/rust#164602 (Improve seek_read_buf_exact() test coverage to match seek_read_exact()) - rust-lang/rust#164772 (docs: Two nitpick changes to `HashMap`, `BTreeMap` Entry API docs) - rust-lang/rust#164794 (Expose FloatErrorKind) - rust-lang/rust#164802 (Migrate stable-specific run-make tests to UI tests) - rust-lang/rust#164899 (Only recover if we may in `parse_expr_tuple_parens`) - rust-lang/rust#164903 (rustc-dev-guide subtree update) Failed merges: - rust-lang/rust#164856 (Switch from `insta` to `expect-test` in bootstrap)
…uwer Rollup of 20 pull requests Successful merges: - rust-lang/rust#163730 (add tests over re-entrancy guarantees for 160776) - rust-lang/rust#164834 (miri subtree update) - rust-lang/rust#164849 (Use the span of the doctest code block fence for figuring out the line number) - rust-lang/rust#164883 (rustdoc: don't panic on a nested use group with no path prefix) - rust-lang/rust#164890 (Store cold blocks in a bitset instead of a Vec of bools) - rust-lang/rust#163458 (stabilize {Rc, Arc}::is_unique) - rust-lang/rust#163499 (vec: stabilise allocators for into_iter) - rust-lang/rust#163805 (std: check `SO_ERROR` after poll in `TcpStream::connect_timeout`) - rust-lang/rust#163816 (stabilize String::into_chars) - rust-lang/rust#163819 (Correct documentation of what `core::ops::Code` is.) - rust-lang/rust#163847 (add regression test for reborrow-invariant-type) - rust-lang/rust#164006 (Arduously fix typo) - rust-lang/rust#164009 (Update `Ready` future expect messages) - rust-lang/rust#164522 (Add IPv6 hop limit stubs to the motor OS net backend) - rust-lang/rust#164602 (Improve seek_read_buf_exact() test coverage to match seek_read_exact()) - rust-lang/rust#164772 (docs: Two nitpick changes to `HashMap`, `BTreeMap` Entry API docs) - rust-lang/rust#164794 (Expose FloatErrorKind) - rust-lang/rust#164802 (Migrate stable-specific run-make tests to UI tests) - rust-lang/rust#164899 (Only recover if we may in `parse_expr_tuple_parens`) - rust-lang/rust#164903 (rustc-dev-guide subtree update) Failed merges: - rust-lang/rust#164856 (Switch from `insta` to `expect-test` in bootstrap)
…uwer Rollup of 20 pull requests Successful merges: - rust-lang/rust#163730 (add tests over re-entrancy guarantees for 160776) - rust-lang/rust#164834 (miri subtree update) - rust-lang/rust#164849 (Use the span of the doctest code block fence for figuring out the line number) - rust-lang/rust#164883 (rustdoc: don't panic on a nested use group with no path prefix) - rust-lang/rust#164890 (Store cold blocks in a bitset instead of a Vec of bools) - rust-lang/rust#163458 (stabilize {Rc, Arc}::is_unique) - rust-lang/rust#163499 (vec: stabilise allocators for into_iter) - rust-lang/rust#163805 (std: check `SO_ERROR` after poll in `TcpStream::connect_timeout`) - rust-lang/rust#163816 (stabilize String::into_chars) - rust-lang/rust#163819 (Correct documentation of what `core::ops::Code` is.) - rust-lang/rust#163847 (add regression test for reborrow-invariant-type) - rust-lang/rust#164006 (Arduously fix typo) - rust-lang/rust#164009 (Update `Ready` future expect messages) - rust-lang/rust#164522 (Add IPv6 hop limit stubs to the motor OS net backend) - rust-lang/rust#164602 (Improve seek_read_buf_exact() test coverage to match seek_read_exact()) - rust-lang/rust#164772 (docs: Two nitpick changes to `HashMap`, `BTreeMap` Entry API docs) - rust-lang/rust#164794 (Expose FloatErrorKind) - rust-lang/rust#164802 (Migrate stable-specific run-make tests to UI tests) - rust-lang/rust#164899 (Only recover if we may in `parse_expr_tuple_parens`) - rust-lang/rust#164903 (rustc-dev-guide subtree update) Failed merges: - rust-lang/rust#164856 (Switch from `insta` to `expect-test` in bootstrap)
Closes #133125
History
Implementation: #133057
Public API
@rustbot modify labels: +T-libs
No unresolved questions so, hoping to get a FCP started ^^