File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ Retry provides a set of defaults that provide `retry.Success` definitions for [O
3737import scala .concurrent .ExecutionContext .Implicits .global
3838import scala .concurrent .Future
3939
40- retry.Backoff ()(Future {
40+ retry.Backoff ()(() => Future {
4141 // something that can "fail"
4242})
4343```
@@ -93,7 +93,7 @@ after a failed attempt.
9393
9494``` scala
9595// retry 4 times
96- val future = retry.Directly (4 ) {
96+ val future = retry.Directly (4 ) { () =>
9797 attempt
9898}
9999```
@@ -104,7 +104,7 @@ The `retry.Pause` module defines interfaces for retrying a future with a configu
104104
105105``` scala
106106// retry 3 times pausing 30 seconds in between attempts
107- val future = retry.Pause (3 , 30 .seconds) {
107+ val future = retry.Pause (3 , 30 .seconds) { () =>
108108 attempt
109109}
110110```
@@ -118,7 +118,7 @@ backoff factor.
118118``` scala
119119// retry 4 times with a delay of 1 second which will be multipled
120120// by 2 on every attempt
121- val future = retry.Backoff (4 , 1 .second) {
121+ val future = retry.Backoff (4 , 1 .second) { () =>
122122 attempt
123123}
124124```
You can’t perform that action at this time.
0 commit comments