Skip to content

Commit 926913a

Browse files
committed
rm bound check
1 parent b9f77cb commit 926913a

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

pgtype/uint32.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -296,12 +296,7 @@ func (scanPlanBinaryTextToUint32Scanner) Scan(src []byte, dst any) error {
296296
return s.ScanText(Text{})
297297
}
298298

299-
if len(src) != 4 {
300-
return fmt.Errorf("invalid length for uint32: %v", len(src))
301-
}
302-
303299
n := uint64(binary.BigEndian.Uint32(src))
304-
305300
return s.ScanText(Text{String: strconv.FormatUint(n, 10), Valid: true})
306301
}
307302

0 commit comments

Comments
 (0)