use older std.mem function names

Cherry-picked bug fix was using renamed functions
This commit is contained in:
Andrew Kelley 2025-10-09 12:46:55 -07:00
parent ca59ad658f
commit f559107fee

View file

@ -763,7 +763,7 @@ pub fn peekDelimiterInclusive(r: *Reader, delimiter: u8) DelimiterError![]u8 {
{ {
const contents = r.buffer[0..r.end]; const contents = r.buffer[0..r.end];
const seek = r.seek; const seek = r.seek;
if (std.mem.findScalarPos(u8, contents, seek, delimiter)) |end| { if (std.mem.indexOfScalarPos(u8, contents, seek, delimiter)) |end| {
@branchHint(.likely); @branchHint(.likely);
return contents[seek .. end + 1]; return contents[seek .. end + 1];
} }
@ -774,7 +774,7 @@ pub fn peekDelimiterInclusive(r: *Reader, delimiter: u8) DelimiterError![]u8 {
try fillMore(r); try fillMore(r);
const seek = r.seek; const seek = r.seek;
const contents = r.buffer[0..r.end]; const contents = r.buffer[0..r.end];
if (std.mem.findScalarPos(u8, contents, seek + content_len, delimiter)) |end| { if (std.mem.indexOfScalarPos(u8, contents, seek + content_len, delimiter)) |end| {
return contents[seek .. end + 1]; return contents[seek .. end + 1];
} }
} }