Skip to content

Conversation

chengfang
Copy link
Contributor

Summary

In bson/primitive/decimal.go around line 167, the following if-else branches contain the same logic, and should be combined:

if high == 0 && low == 0 && exp == 0 {
  if posSign {
    return new(big.Int), 0, nil
  }
  return new(big.Int), 0, nil

 ## Background & Motivation

Make the code more readable and robust

@chengfang chengfang requested a review from a team as a code owner January 29, 2024 04:03
@chengfang chengfang requested review from qingyang-hu and removed request for a team January 29, 2024 04:03
@qingyang-hu qingyang-hu changed the title Combine the identical if-else branches in bson/primitive/decimal.go GODRIVER-3111 Combine the identical if-else branches in bson/primitive/decimal.go Jan 31, 2024
Copy link
Contributor

API Change Report

No changes found!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants