mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
encoding.hex: fix shift warning
This commit is contained in:
parent
a61b4809dc
commit
d02c0636d8
@ -42,7 +42,7 @@ pub fn decode(s string) ?[]byte {
|
|||||||
// output will always be a string with length a multiple of 2.
|
// output will always be a string with length a multiple of 2.
|
||||||
[manualfree]
|
[manualfree]
|
||||||
pub fn encode(bytes []byte) string {
|
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 {
|
for b in bytes {
|
||||||
sb.write_string(b.hex())
|
sb.write_string(b.hex())
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user