Skip to content

Commit af7c10f

Browse files
committed
a little refactor
1 parent 56f98e9 commit af7c10f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

retry.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,7 @@ func (t *timerImpl) After(d time.Duration) <-chan time.Time {
112112

113113
func Do(retryableFunc RetryableFunc, opts ...Option) error {
114114
retryableFuncWithData := func() (any, error) {
115-
err := retryableFunc()
116-
return nil, err
115+
return nil, retryableFunc()
117116
}
118117

119118
_, err := DoWithData(retryableFuncWithData, opts...)

0 commit comments

Comments
 (0)