Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 2b8c7a3

Browse files
committedJun 24, 2024
Small fixme in core now that split_first has no codegen issues
1 parent c26bd79 commit 2b8c7a3

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed
 

‎core/src/num/dec2flt/common.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,7 @@ impl ByteSlice for [u8] {
3939
fn parse_digits(&self, mut func: impl FnMut(u8)) -> &Self {
4040
let mut s = self;
4141

42-
// FIXME: Can't use s.split_first() here yet,
43-
// see https://github.com/rust-lang/rust/issues/109328
44-
while let [c, s_next @ ..] = s {
42+
while let Some((c, s_next)) = s.split_first() {
4543
let c = c.wrapping_sub(b'0');
4644
if c < 10 {
4745
func(c);

‎core/src/num/dec2flt/parse.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,7 @@ fn try_parse_19digits(s_ref: &mut &[u8], x: &mut u64) {
5151
let mut s = *s_ref;
5252

5353
while *x < MIN_19DIGIT_INT {
54-
// FIXME: Can't use s.split_first() here yet,
55-
// see https://github.com/rust-lang/rust/issues/109328
56-
if let [c, s_next @ ..] = s {
54+
if let Some((c, s_next)) = s.split_first() {
5755
let digit = c.wrapping_sub(b'0');
5856

5957
if digit < 10 {

0 commit comments

Comments
 (0)
Failed to load comments.