refactor: orm/encoding/encodeutil: remove impossible len overflow check (#17643)

This commit is contained in:
Emmanuel T Odeke
2023-09-11 11:07:58 +00:00
committed by GitHub
parent 1938950564
commit d053fc0956
+4 -7
View File
@@ -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