encoding.hex: fix shift warning

pull/13360/head
Delyan Angelov 2022-02-04 15:16:08 +02:00
parent a61b4809dc
commit d02c0636d8
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED
1 changed files with 1 additions and 1 deletions

View File

@ -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())
}