Skip to content
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

Tracking Issue for decode_utf8 #90981

Closed
3 tasks
mbartlett21 opened this issue Nov 17, 2021 · 1 comment
Closed
3 tasks

Tracking Issue for decode_utf8 #90981

mbartlett21 opened this issue Nov 17, 2021 · 1 comment
Labels
C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@mbartlett21
Copy link
Contributor

Feature gate: #![feature(decode_utf8)]

This is a tracking issue for decoding characters from byte (u8) iterators.

Public API

// core::char

struct DecodeUtf8<I: Iterator<Item = u8>>;

impl Iterator for DecodeUtf8<_> { .. }

struct DecodeUtf8Error;

impl DecodeUtf8Error {
    fn invalid_byte(&self) -> u8;
}

// Also a method on `char`
fn decode_utf8<I: IntoIterator<Item = u8>>(i: I) -> DecodeUtf8<I::IntoIter>;

Steps / History

Unresolved Questions

  • Should the error just consist of a single byte?
@mbartlett21 mbartlett21 added C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. labels Nov 17, 2021
@mbartlett21
Copy link
Contributor Author

Actually, after looking around a bit, Rust already had this and it was deprecated and removed, so closing for now.

(#33906)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

1 participant