mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 05:44:20 +00:00
use older std.mem function names
Cherry-picked bug fix was using renamed functions
This commit is contained in:
parent
ca59ad658f
commit
f559107fee
1 changed files with 2 additions and 2 deletions
|
|
@ -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];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue