Skip to content

Commit

Permalink
fix: update location geocode api signiture
Browse files Browse the repository at this point in the history
  • Loading branch information
gtokman committed Sep 20, 2021
1 parent f678099 commit 907d4f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/ExtensionKit/CoreLocation/CLLocation.swift
Expand Up @@ -18,10 +18,10 @@ public extension CLLocation {
/// Reverse geocode a `CLLocation`
/// - Parameter location: `CLLocation`
/// - Returns: Future with Result<[`CLPlacemark`], `GeocodeError`>
func reverseGeocode(location: CLLocation) -> Deferred<Future<[CLPlacemark], GeocodeError>> {
func reverseGeocode() -> Deferred<Future<[CLPlacemark], GeocodeError>> {
Deferred {
Future { promise in
CLGeocoder().reverseGeocodeLocation(location) { placemarks, error -> Void in
CLGeocoder().reverseGeocodeLocation(self) { placemarks, error -> Void in
if let err = error {
return promise(.failure(.invalid("\(String(describing: err))")))
}
Expand Down

0 comments on commit 907d4f3

Please sign in to comment.