Skip to content

Commit

Permalink
rm bound check
Browse files Browse the repository at this point in the history
  • Loading branch information
jennifersp committed Aug 21, 2024
1 parent b9f77cb commit 926913a
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions pgtype/uint32.go
Original file line number Diff line number Diff line change
Expand Up @@ -296,12 +296,7 @@ func (scanPlanBinaryTextToUint32Scanner) Scan(src []byte, dst any) error {
return s.ScanText(Text{})
}

if len(src) != 4 {
return fmt.Errorf("invalid length for uint32: %v", len(src))
}

n := uint64(binary.BigEndian.Uint32(src))

return s.ScanText(Text{String: strconv.FormatUint(n, 10), Valid: true})
}

Expand Down

0 comments on commit 926913a

Please sign in to comment.