From c1eb714a7f756718070c304e4e95331f283965dc Mon Sep 17 00:00:00 2001 From: Unknown User <52547845+unknown-v@users.noreply.github.com> Date: Tue, 8 Oct 2019 12:24:02 +0200 Subject: [PATCH] bitfield: change `[0;n]` to `[0].repeat(n)` --- vlib/bitfield/bitfield.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlib/bitfield/bitfield.v b/vlib/bitfield/bitfield.v index ab3c0b72a7..e6bd067632 100644 --- a/vlib/bitfield/bitfield.v +++ b/vlib/bitfield/bitfield.v @@ -112,7 +112,7 @@ pub fn new(size int) BitField { output := BitField{ size: size //field: *u32(calloc(bitnslots(size) * SLOT_SIZE / 8)) - field: [u32(0); bitnslots(size)] + field: [u32(0)].repeat(bitnslots(size)) } return output }