From 25ec2dbc1e2302d1138749262b588d3e438fcd55 Mon Sep 17 00:00:00 2001 From: Tadeo Kondrak Date: Sat, 17 Oct 2020 18:04:53 -0600 Subject: Add builtin.Signedness, use it instead of is_signed --- lib/std/leb128.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/std/leb128.zig') diff --git a/lib/std/leb128.zig b/lib/std/leb128.zig index 2fa5776e1f..2a8a6fc2ff 100644 --- a/lib/std/leb128.zig +++ b/lib/std/leb128.zig @@ -297,8 +297,8 @@ test "deserialize unsigned LEB128" { fn test_write_leb128(value: anytype) !void { const T = @TypeOf(value); - const t_signed = @typeInfo(T).Int.is_signed; - const signedness = if (t_signed) .signed else .unsigned; + const signedness = @typeInfo(T).Int.signedness; + const t_signed = signedness == .signed; const writeStream = if (t_signed) writeILEB128 else writeULEB128; const readStream = if (t_signed) readILEB128 else readULEB128; -- cgit v1.2.3