From 5b1a968d2b6bf0ae748cc29623dcbdb5c4725fff Mon Sep 17 00:00:00 2001 From: Cheng Fang Date: Sun, 28 Jan 2024 22:59:07 -0500 Subject: [PATCH] Combine the identical if-else branches in bson/primitive/decimal.go --- bson/primitive/decimal.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/bson/primitive/decimal.go b/bson/primitive/decimal.go index 24ab58fc49..08c39514be 100644 --- a/bson/primitive/decimal.go +++ b/bson/primitive/decimal.go @@ -164,9 +164,6 @@ func (d Decimal128) BigInt() (*big.Int, int, error) { // Would be handled by the logic below, but that's trivial and common. if high == 0 && low == 0 && exp == 0 { - if posSign { - return new(big.Int), 0, nil - } return new(big.Int), 0, nil }