-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Tracking Issue for explicit-endian String::from_utf16 #116258
Copy link
Copy link
Open
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCS-waiting-on-fcpStatus: PR is in FCP and is awaiting for FCP to complete.Status: PR is in FCP and is awaiting for FCP to complete.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.disposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.This issue / PR is in PFCP or FCP with a disposition to merge it.proposed-final-comment-periodProposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off.Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off.
Metadata
Metadata
Assignees
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCS-waiting-on-fcpStatus: PR is in FCP and is awaiting for FCP to complete.Status: PR is in FCP and is awaiting for FCP to complete.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.disposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.This issue / PR is in PFCP or FCP with a disposition to merge it.proposed-final-comment-periodProposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off.Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Feature gate:
#![feature(str_from_utf16_endian)]This is a tracking issue for versions of
String::from_utf16which take&[u8]and use a specific endianness.Public API
Steps / History
Unresolved Questions
from_utf16le,from_utf16_le,from_le_utf16,from_le_utf16_bytes, and other such combinations.with_capacity+pushimplementation used forfrom_utf16whilecollectdoesn't reserve capacity? (Collecting into a Result<Vec<_>> doesn't reserve the capacity in advance #48994)FromUtf16Errorcurrently displays as"invalid utf-16: lone surrogate found"which isn't correct for an error due to odd byte length.from_utf16method takes&[u16]so can't have the odd-length problem that&[u8]can.Footnotes
https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html ↩