diff options
| author | Tadeo Kondrak <me@tadeo.ca> | 2020-10-17 18:04:53 -0600 |
|---|---|---|
| committer | Veikka Tuominen <git@vexu.eu> | 2020-11-19 18:59:21 +0200 |
| commit | 25ec2dbc1e2302d1138749262b588d3e438fcd55 (patch) | |
| tree | 34187fbd88b2e9b046f50cea93f482a191bc3248 /lib/std/leb128.zig | |
| parent | 2b7781d82ad8d2234b89257676670957e005f214 (diff) | |
| download | zig-25ec2dbc1e2302d1138749262b588d3e438fcd55.tar.gz zig-25ec2dbc1e2302d1138749262b588d3e438fcd55.zip | |
Add builtin.Signedness, use it instead of is_signed
Diffstat (limited to 'lib/std/leb128.zig')
| -rw-r--r-- | lib/std/leb128.zig | 4 |
1 files changed, 2 insertions, 2 deletions
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; |
