Skip to content

Commit 35149e1

Browse files
committed
'Cancel' for PromiseKit --
* update extensions to point at the latest version of PromiseKit in the pull request * fix "generic parameter 'T' could not be inferred" compilation errors when using the new 'Promise' initializer that takes a cancellable task
1 parent b824a21 commit 35149e1

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Cartfile.resolved

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
github "dougzilla32/PromiseKit" "5069bdc1b10847d47f5fdbe3accb623b3b1908a3"
1+
github "dougzilla32/PromiseKit" "dcf77e0afe55e3d18da9a2a5bda28cdf1adcb5a9"

Sources/MKDirections+Promise.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ import PromiseKit
1616
extension MKDirections {
1717
/// Begins calculating the requested route information asynchronously.
1818
public func calculate() -> Promise<MKDirectionsResponse> {
19-
return Promise(cancellableTask: MKDirectionsTask(self)) { calculate(completionHandler: $0.resolve) }
19+
return Promise<MKDirectionsResponse>(cancellableTask: MKDirectionsTask(self)) { calculate(completionHandler: $0.resolve) }
2020
}
2121

2222
/// Begins calculating the requested travel-time information asynchronously.
2323
public func calculateETA() -> Promise<MKETAResponse> {
24-
return Promise(cancellableTask: MKDirectionsTask(self)) { calculateETA(completionHandler: $0.resolve) }
24+
return Promise<MKETAResponse>(cancellableTask: MKDirectionsTask(self)) { calculateETA(completionHandler: $0.resolve) }
2525
}
2626
}
2727

Sources/MKMapSnapshotter+Promise.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import PromiseKit
1616
extension MKMapSnapshotter {
1717
/// Starts generating the snapshot using the options set in this object.
1818
public func start() -> Promise<MKMapSnapshot> {
19-
return Promise(cancellableTask: MKMapSnapshotterTask(self)) { start(completionHandler: $0.resolve) }
19+
return Promise<MKMapSnapshot>(cancellableTask: MKMapSnapshotterTask(self)) { start(completionHandler: $0.resolve) }
2020
}
2121
}
2222

0 commit comments

Comments
 (0)