1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

crypto.rand: update slice method to slice syntax & fix typo in error

This commit is contained in:
joe-conigliaro
2020-02-02 12:50:46 +11:00
committed by GitHub
parent 05374e162e
commit 8bd17c8016
2 changed files with 2 additions and 2 deletions

View File

@@ -43,7 +43,7 @@ fn bytes_to_u64(b []byte) []u64 {
mut z := [u64(0)].repeat((b.len + ws - 1) / ws)
mut i := b.len
for k := 0; i >= ws; k++ {
z[k] = binary.big_endian_u64(b.slice(i-ws, i))
z[k] = binary.big_endian_u64(b[i-ws..i])
i -= ws
}
if i > 0 {