aboutsummaryrefslogtreecommitdiff
path: root/retry.go
diff options
context:
space:
mode:
Diffstat (limited to 'retry.go')
-rw-r--r--retry.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/retry.go b/retry.go
index 1997b18..1adcfd0 100644
--- a/retry.go
+++ b/retry.go
@@ -11,7 +11,7 @@ var retries = pprof.NewProfile("stmRetries")
var retry = &struct{}{}
// catchRetry returns true if fn calls tx.Retry.
-func catchRetry(fn Operation, tx *Tx) (result interface{}, gotRetry bool) {
+func catchRetry[R any](fn Operation[R], tx *Tx) (result R, gotRetry bool) {
defer func() {
if r := recover(); r == retry {
gotRetry = true