feat(lo.Try0): remove type definition

This commit is contained in:
Samuel Berthe
2022-05-02 14:51:02 +02:00
parent d2d7090565
commit d54996c157
3 changed files with 5 additions and 2 deletions
+3
View File
@@ -9,6 +9,9 @@ Adding:
- lo.Synchronize
- lo.SumBy
Change:
- Removed generic type definition for lo.Try0: `lo.Try0[T]()` -> `lo.Try0()`
## 1.19.0 (2022-04-30)
Adding:
+1 -1
View File
@@ -79,7 +79,7 @@ func Try(callback func() error) (ok bool) {
}
// Try0 has the same behavior than Try, but callback returns no variable.
func Try0[T any](callback func()) bool {
func Try0(callback func()) bool {
return Try(func() error {
callback()
return nil
+1 -1
View File
@@ -92,7 +92,7 @@ func TestAttemptWithDelay(t *testing.T) {
is.Equal(err3, err)
is.Equal(iter4, 11)
is.Greater(dur4, 100*time.Millisecond)
is.Less(dur4, 110*time.Millisecond)
is.Less(dur4, 115*time.Millisecond)
is.Equal(err4, nil)
}