Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e4c779c

Browse files
committed
smallnest#267 don't use SliceByteToString for decode meta
1 parent ed89e5a commit e4c779c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

โ€Žprotocol/message.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ func decodeMetadata(l uint32, data []byte) (map[string]string, error) {
366366
if n+sl > l-4 {
367367
return m, ErrMetaKVMissing
368368
}
369-
k := util.SliceByteToString(data[n : n+sl])
369+
k := string(data[n : n+sl])
370370
n = n + sl
371371

372372
// value
@@ -375,7 +375,7 @@ func decodeMetadata(l uint32, data []byte) (map[string]string, error) {
375375
if n+sl > l {
376376
return m, ErrMetaKVMissing
377377
}
378-
v := util.SliceByteToString(data[n : n+sl])
378+
v := string(data[n : n+sl])
379379
n = n + sl
380380
m[k] = v
381381
}

0 commit comments

Comments
ย (0)