Skip to content

Commit

Permalink
bump v1.38.1
Browse files Browse the repository at this point in the history
  • Loading branch information
samber committed Mar 21, 2023
1 parent 4a453a4 commit 01fc0fd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

@samber: I sometimes forget to update this file. Ping me on [Twitter](https://twitter.com/samuelberthe) or open an issue in case of error. We need to keep a clear changelog for easier lib upgrade.

## 1.38.0 (2023-xx-xx)
## 1.38.1 (2023-03-20)

Improvement:
- Async and AsyncX: now returns `<-chan T` instead of `chan T`
Expand Down
1 change: 1 addition & 0 deletions type_manipulation.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ func ToPtr[T any](x T) *T {
// EmptyableToPtr returns a pointer copy of value if it's nonzero.
// Otherwise, returns nil pointer.
func EmptyableToPtr[T any](x T) *T {
// 馃ぎ
isZero := reflect.ValueOf(&x).Elem().IsZero()
if isZero {
return nil
Expand Down

0 comments on commit 01fc0fd

Please sign in to comment.