refactor: orm/encoding/encodeutil: remove impossible len overflow check (#17643)
This commit is contained in:
parent
1938950564
commit
d053fc0956
@ -13,13 +13,10 @@ import (
|
||||
// This is used for efficient logical decoding of keys.
|
||||
func SkipPrefix(r *bytes.Reader, prefix []byte) error {
|
||||
n := len(prefix)
|
||||
if n > 0 {
|
||||
// we skip checking the prefix for performance reasons because we assume
|
||||
// that it was checked by the caller
|
||||
_, err := r.Seek(int64(n), io.SeekCurrent)
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
// we skip checking the prefix for performance reasons because we assume
|
||||
// that it was checked by the caller
|
||||
_, err := r.Seek(int64(n), io.SeekCurrent)
|
||||
return err
|
||||
}
|
||||
|
||||
// AppendVarUInt32 creates a new key prefix, by encoding and appending a
|
||||
|
||||
Loading…
Reference in New Issue
Block a user