authorgravatar for robert.ancell@gmail.comRobert Ancell <robert.ancell@gmail.com> 2026-01-27 05:29:51+01:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-01-27 05:29:51+01:00
log0af79e7b8c50e80764e9833767967db038e3cbf1
treecf11e01e896bb563796799a1f0c4b551aa37adb4
parent951ab1b18bf43cafa8ef0b07892eeaf704551482

std.mem.readVarInt: Fix type name in doc comment (#31007)

Code used `ReturnType`, comment used `T` (which is what is used in similar functions). Reviewed-on: https://codeberg.org/ziglang/zig/pulls/31007 Co-authored-by: Robert Ancell <robert.ancell@gmail.com> Co-committed-by: Robert Ancell <robert.ancell@gmail.com>

1 files changed, 1 insertions(+), 1 deletions(-)

lib/std/mem.zig+1-1
......@@ -1823,7 +1823,7 @@ test containsAtLeastScalar2 {
18231823}
18241824
18251825/// Reads an integer from memory with size equal to bytes.len.
1826/// T specifies the return type, which must be large enough to store
1826/// ReturnType specifies the return type, which must be large enough to store
18271827/// the result.
18281828pub fn readVarInt(comptime ReturnType: type, bytes: []const u8, endian: Endian) ReturnType {
18291829 assert(@typeInfo(ReturnType).int.bits >= bytes.len * 8);