mirror of
https://github.com/ziglang/zig.git
synced 2026-02-13 04:48:20 +00:00
std.io.BufferedReader: fix peekSentinel
it was tossing 2x
This commit is contained in:
parent
d9aa84de28
commit
6fe9c8f036
@ -511,7 +511,7 @@ pub fn takeSentinel(br: *BufferedReader, comptime sentinel: u8) DelimiterError![
|
||||
}
|
||||
|
||||
pub fn peekSentinel(br: *BufferedReader, comptime sentinel: u8) DelimiterError![:sentinel]u8 {
|
||||
const result = try br.takeDelimiterInclusive(sentinel);
|
||||
const result = try br.peekDelimiterInclusive(sentinel);
|
||||
return result[0 .. result.len - 1 :sentinel];
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user