Skip to content

Commit 09782c0

Browse files
committed
remove uneeded var ok bool from AsInt functions
1 parent 3c97a45 commit 09782c0

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

x/bsonx/bsoncore/value.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ func (v Value) AsInt64() int64 {
137137
}
138138
i64 = int64(f64)
139139
case TypeInt32:
140-
var ok bool
141140
i32, _, ok := ReadInt32(v.Data)
142141
if !ok {
143142
panic(NewInsufficientBytesError(v.Data, v.Data))
@@ -170,7 +169,6 @@ func (v Value) AsInt64OK() (int64, bool) {
170169
}
171170
i64 = int64(f64)
172171
case TypeInt32:
173-
var ok bool
174172
i32, _, ok := ReadInt32(v.Data)
175173
if !ok {
176174
return 0, false

0 commit comments

Comments
 (0)