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
37
37
import scala .concurrent .ExecutionContext .Implicits .global
38
38
import scala .concurrent .Future
39
39
40
- retry.Backoff ()(Future {
40
+ retry.Backoff ()(() => Future {
41
41
// something that can "fail"
42
42
})
43
43
```
@@ -93,7 +93,7 @@ after a failed attempt.
93
93
94
94
``` scala
95
95
// retry 4 times
96
- val future = retry.Directly (4 ) {
96
+ val future = retry.Directly (4 ) { () =>
97
97
attempt
98
98
}
99
99
```
@@ -104,7 +104,7 @@ The `retry.Pause` module defines interfaces for retrying a future with a configu
104
104
105
105
``` scala
106
106
// 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) { () =>
108
108
attempt
109
109
}
110
110
```
@@ -118,7 +118,7 @@ backoff factor.
118
118
``` scala
119
119
// retry 4 times with a delay of 1 second which will be multipled
120
120
// by 2 on every attempt
121
- val future = retry.Backoff (4 , 1 .second) {
121
+ val future = retry.Backoff (4 , 1 .second) { () =>
122
122
attempt
123
123
}
124
124
```
You can’t perform that action at this time.
0 commit comments