From d02c0636d8a8fdf8b6528dc3ef675a0be96f0933 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Fri, 4 Feb 2022 15:16:08 +0200 Subject: [PATCH] encoding.hex: fix shift warning --- vlib/encoding/hex/hex.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlib/encoding/hex/hex.v b/vlib/encoding/hex/hex.v index 99387f15e7..7698f4acf0 100644 --- a/vlib/encoding/hex/hex.v +++ b/vlib/encoding/hex/hex.v @@ -42,7 +42,7 @@ pub fn decode(s string) ?[]byte { // output will always be a string with length a multiple of 2. [manualfree] pub fn encode(bytes []byte) string { - mut sb := strings.new_builder(bytes.len << 1) + mut sb := strings.new_builder(bytes.len * 2) for b in bytes { sb.write_string(b.hex()) }