io: no need to do ValueOf() again, it's known

Signed-off-by: Roman Khimov <roman@nspcc.ru>
This commit is contained in:
Roman Khimov 2024-11-15 22:28:53 +03:00
parent c2b4d32224
commit a123b75fd9

View file

@ -73,7 +73,7 @@ func GetVarSize(value any) int {
valueSize := 0 valueSize := 0
if valueLength != 0 { if valueLength != 0 {
switch reflect.ValueOf(value).Index(0).Interface().(type) { switch v.Index(0).Interface().(type) {
case Serializable: case Serializable:
for i := range valueLength { for i := range valueLength {
valueSize += GetVarSize(v.Index(i).Interface()) valueSize += GetVarSize(v.Index(i).Interface())