Repository navigation
Stabilize int_from_ascii - #163696
Stabilize int_from_ascii#163696ajtribick wants to merge 1 commit into
int_from_ascii#163696Conversation
|
rustbot has assigned @Mark-Simulacrum. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
Seems like you're not actually stabilizing the |
|
Thanks, good point, updated the description. |
|
@rfcbot fcp merge libs |
|
@Mark-Simulacrum 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. |
|
Note that this relies on |
I think if someone is passing in entire vectors that's more a them problem than anything. Maybe worth a Clippy lint but it would be weird if a function called from_ascii couldn't take a &[ascii::Char] without a manual conversion. |
This is my first time raising a stabilization PR, hopefully I'm not messing up the process here. I had noticed this Zulip thread where it is mentioned that the stabilization guide is outdated and the FCP is done on the stabilization PR now. Thanks to @niklasf for keeping the tracking issue up-to-date, the Implementation history and API description are taken striaght from there.
Stabilization report
Closes #134821
See also Zulip discussion: https://rust-lang.zulipchat.com/#narrow/channel/327149-t-libs.2Fapi-changes/topic/How.20to.20proceed.20with.20int_from_ascii
Implementation history
T: Implementint_from_ascii(#134821) #134824NonZero<T>: feat: Implementint_from_asciiforNonZero<T>#152267API being stabilized
For each integer type
X(usize,u8,u16,u32,u64,u128,isize,i8,i16,i32,i64,i128):Experience report
The tracking issue has received a number of emoji reactions, including 7 thumbs up when it was suggested to FCP this on Jun 24 #134821 (comment)
The atoi crate which provides this functionality with a different API, has over 200 million downloads, indicating that there is a need for the ability to do this.
To validate the design, I have built a reduced version of a parser that makes use of this feature at https://github.com/ajtribick/int_from_ascii_test
Potential issues / questions
&str, as suggested in Tracking Issue forint_from_ascii#134821 (comment)