diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2020-03-19 18:06:16 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-03-19 18:06:16 -0400 |
| commit | dc04e97098010f590d109e6e70d4afe79cd8f01b (patch) | |
| tree | bed11818fd80fe7b4557f4253c8d5562de773624 /lib/std/crypto/sha2.zig | |
| parent | 555a2c03286507ffe4bd3bea2154dbfb719ebef1 (diff) | |
| parent | 160367e0ddcb36b6957e603d869507b9d7542edc (diff) | |
| download | zig-dc04e97098010f590d109e6e70d4afe79cd8f01b.tar.gz zig-dc04e97098010f590d109e6e70d4afe79cd8f01b.zip | |
Merge pull request #4752 from ziglang/slice-array
slicing with comptime start and end indexes results in pointer-to-array
Diffstat (limited to 'lib/std/crypto/sha2.zig')
| -rw-r--r-- | lib/std/crypto/sha2.zig | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/std/crypto/sha2.zig b/lib/std/crypto/sha2.zig index fd7ad532a3..f004bceac3 100644 --- a/lib/std/crypto/sha2.zig +++ b/lib/std/crypto/sha2.zig @@ -167,8 +167,7 @@ fn Sha2_32(comptime params: Sha2Params32) type { const rr = d.s[0 .. params.out_len / 32]; for (rr) |s, j| { - // TODO https://github.com/ziglang/zig/issues/863 - mem.writeIntSliceBig(u32, out[4 * j .. 4 * j + 4], s); + mem.writeIntBig(u32, out[4 * j ..][0..4], s); } } @@ -509,8 +508,7 @@ fn Sha2_64(comptime params: Sha2Params64) type { const rr = d.s[0 .. params.out_len / 64]; for (rr) |s, j| { - // TODO https://github.com/ziglang/zig/issues/863 - mem.writeIntSliceBig(u64, out[8 * j .. 8 * j + 8], s); + mem.writeIntBig(u64, out[8 * j ..][0..8], s); } } |
