-
Notifications
You must be signed in to change notification settings - Fork 19
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
Move Utf8Chunks::new
to be inherent on [u8]
#190
Labels
ACP-accepted
API Change Proposal is accepted (seconded with no objections)
api-change-proposal
A proposal to add or alter unstable APIs in the standard libraries
T-libs-api
Comments
dylni
added
api-change-proposal
A proposal to add or alter unstable APIs in the standard libraries
T-libs-api
labels
Mar 12, 2023
4 tasks
dtolnay
added
the
ACP-accepted
API Change Proposal is accepted (seconded with no objections)
label
Apr 11, 2024
bors
added a commit
to rust-lang-ci/rust
that referenced
this issue
Apr 15, 2024
Stabilize `Utf8Chunks` Pending FCP in rust-lang#99543. This PR includes the proposed modification in rust-lang/libs-team#190 as agreed in rust-lang#99543 (comment).
bors
added a commit
to rust-lang-ci/rust
that referenced
this issue
Apr 26, 2024
Stabilize `Utf8Chunks` Pending FCP in rust-lang#99543. This PR includes the proposed modification in rust-lang/libs-team#190 as agreed in rust-lang#99543 (comment).
RalfJung
pushed a commit
to RalfJung/miri
that referenced
this issue
Apr 27, 2024
Stabilize `Utf8Chunks` Pending FCP in rust-lang/rust#99543. This PR includes the proposed modification in rust-lang/libs-team#190 as agreed in rust-lang/rust#99543 (comment).
RalfJung
pushed a commit
to RalfJung/rust-analyzer
that referenced
this issue
Apr 27, 2024
Stabilize `Utf8Chunks` Pending FCP in rust-lang/rust#99543. This PR includes the proposed modification in rust-lang/libs-team#190 as agreed in rust-lang/rust#99543 (comment).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
ACP-accepted
API Change Proposal is accepted (seconded with no objections)
api-change-proposal
A proposal to add or alter unstable APIs in the standard libraries
T-libs-api
Proposal
Problem statement
Utf8Chunks::new
requires importingUtf8Chunks
. Adding this method on[u8]
would allow it to be used without an import.This API is unstable, so this is not a breaking change.
Motivation, use-cases
This is similar to other methods treating
[u8]
as a byte string, such as<[u8]>::is_ascii
.Example
Code using
Utf8Chunks::new
:Code using
<[u8]>::utf8_chunks
:Solution sketches
Current signature:
Proposed signature:
Links and related work
utf8_chunks
rust#99543Utf8LossyChunksIter
#54Utf8Lossy
asUtf8Chunks
rust#99544What happens now?
This issue is part of the libs-api team API change proposal process. Once this issue is filed the libs-api team will review open proposals in its weekly meeting. You should receive feedback within a week or two.
The text was updated successfully, but these errors were encountered: