Skip to content

Commit d02c063

Browse files
committed
encoding.hex: fix shift warning
1 parent a61b480 commit d02c063

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vlib/encoding/hex/hex.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ pub fn decode(s string) ?[]byte {
4242
// output will always be a string with length a multiple of 2.
4343
[manualfree]
4444
pub fn encode(bytes []byte) string {
45-
mut sb := strings.new_builder(bytes.len << 1)
45+
mut sb := strings.new_builder(bytes.len * 2)
4646
for b in bytes {
4747
sb.write_string(b.hex())
4848
}

0 commit comments

Comments
 (0)