Skip to content

Commit

Permalink
inline single-use function
Browse files Browse the repository at this point in the history
  • Loading branch information
joellubi committed Aug 12, 2024
1 parent d13774e commit e282e53
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions go/arrow/extensions/bool8.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func (a *Bool8Array) String() string {
}

func (a *Bool8Array) Value(i int) bool {
return int8ToBool(a.Storage().(*array.Int8).Value(i))
return a.Storage().(*array.Int8).Value(i) != 0
}

func (a *Bool8Array) ValueStr(i int) string {
Expand Down Expand Up @@ -124,10 +124,6 @@ func boolToInt8(v bool) int8 {
return res
}

func int8ToBool(v int8) bool {
return v != 0
}

// Bool8Builder is a convenience builder for the Bool8 extension type,
// allowing arrays to be built with boolean values rather than the underlying storage type.
type Bool8Builder struct {
Expand Down

0 comments on commit e282e53

Please sign in to comment.