Skip to content

Commit

Permalink
Resolved type inference bug for older swift versions
Browse files Browse the repository at this point in the history
  • Loading branch information
ptoffy committed Oct 7, 2022
1 parent 9ac9b52 commit 04b7fd6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Sources/Queues/QueueWorker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ public struct QueueWorker {
name: String,
startTime: UInt64,
queue: Queue,
error: (any Error)? = nil
error: Error? = nil
) {
// Checks how long the job took to complete
Timer(
Expand Down
6 changes: 3 additions & 3 deletions Tests/QueuesTests/MetricsTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ final class MetricsTests: XCTestCase {
let promise = app.eventLoopGroup.next().makePromise(of: Void.self)
app.queues.add(AsyncFoo(promise: promise))

app.get("foo") { req async throws in
app.get("foo") { req async throws -> String in
try await req.queue.dispatch(AsyncFoo.self, .init(foo: "bar"), id: JobIdentifier(string: "some-id"))
return "done"
}
Expand Down Expand Up @@ -59,7 +59,7 @@ final class MetricsTests: XCTestCase {
ErrorHook.errorCount = 0
DequeuedHook.successHit = false

app.get("foo") { req async throws in
app.get("foo") { req async throws -> String in
try await req.queue.dispatch(AsyncFoo.self, .init(foo: "bar"), id: JobIdentifier(string: "first"))
try await req.queue.dispatch(AsyncFoo.self, .init(foo: "rab"), id: JobIdentifier(string: "second"))
return "done"
Expand Down Expand Up @@ -113,7 +113,7 @@ final class MetricsTests: XCTestCase {
let promise = app.eventLoopGroup.next().makePromise(of: Void.self)
app.queues.add(AsyncFoo(promise: promise))

app.get("foo") { req async throws in
app.get("foo") { req async throws -> String in
try await req.queue.dispatch(AsyncFoo.self, .init(foo: "bar"), id: JobIdentifier(string: "first"))
try await req.queue.dispatch(AsyncFoo.self, .init(foo: "rab"), id: JobIdentifier(string: "second"))
return "done"
Expand Down

0 comments on commit 04b7fd6

Please sign in to comment.