Skip to content

Commit 85d412c

Browse files
committed
fix: use correct docs
1 parent 35bd18a commit 85d412c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Sources/Retry/Retry.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ public enum RetryStrategy<C> where C: Clock {
130130
/// let (data, response) = try await retry(maxAttempts: 5) {
131131
/// try await URLSession.shared.data(from: url)
132132
/// } strategy: { _ in
133-
/// return .backoff(.constant(c: .seconds(2)))
133+
/// return .backoff(.constant(.seconds(2)))
134134
/// }
135135
/// ```
136136
/// Similarly to the first customization, if any error occurs, the operation will be tried 4 more times.
@@ -157,7 +157,7 @@ public enum RetryStrategy<C> where C: Clock {
157157
/// return (data, response)
158158
/// } strategy: { error in
159159
/// if let error = error as? TooManyRequests {
160-
/// return .backoff(.constant(c: .seconds(error.retryAfter)))
160+
/// return .backoff(.constant(.seconds(error.retryAfter)))
161161
/// } else {
162162
/// return .stop
163163
/// }
@@ -233,7 +233,7 @@ public func retry<R, E, C>(
233233
/// let (data, response) = try await retry(maxAttempts: 5) {
234234
/// try await URLSession.shared.data(from: url)
235235
/// } strategy: { _ in
236-
/// return .backoff(.constant(c: .seconds(2)))
236+
/// return .backoff(.constant(.seconds(2)))
237237
/// }
238238
/// ```
239239
/// Similarly to the first customization, if any error occurs, the operation will be tried 4 more times.
@@ -260,7 +260,7 @@ public func retry<R, E, C>(
260260
/// return (data, response)
261261
/// } strategy: { error in
262262
/// if let error = error as? TooManyRequests {
263-
/// return .backoff(.constant(c: .seconds(error.retryAfter)))
263+
/// return .backoff(.constant(.seconds(error.retryAfter)))
264264
/// } else {
265265
/// return .stop
266266
/// }

0 commit comments

Comments
 (0)