@@ -16,28 +16,28 @@ import PromiseKit
16
16
extension CLGeocoder {
17
17
/// Submits a reverse-geocoding request for the specified location.
18
18
public func reverseGeocode( location: CLLocation ) -> Promise < [ CLPlacemark ] > {
19
- return Promise ( . pending ) { seal in
19
+ return Promise { seal in
20
20
reverseGeocodeLocation ( location, completionHandler: seal. resolve)
21
21
}
22
22
}
23
23
24
24
/// Submits a forward-geocoding request using the specified address dictionary.
25
25
public func geocode( _ addressDictionary: [ String : String ] ) -> Promise < [ CLPlacemark ] > {
26
- return Promise ( . pending ) { seal in
26
+ return Promise { seal in
27
27
geocodeAddressDictionary ( addressDictionary, completionHandler: seal. resolve)
28
28
}
29
29
}
30
30
31
31
/// Submits a forward-geocoding request using the specified address string.
32
32
public func geocode( _ addressString: String ) -> Promise < [ CLPlacemark ] > {
33
- return Promise ( . pending ) { seal in
33
+ return Promise { seal in
34
34
geocodeAddressString ( addressString, completionHandler: seal. resolve)
35
35
}
36
36
}
37
37
38
38
/// Submits a forward-geocoding request using the specified address string within the specified region.
39
39
public func geocode( _ addressString: String , region: CLRegion ? ) -> Promise < [ CLPlacemark ] > {
40
- return Promise ( . pending ) { seal in
40
+ return Promise { seal in
41
41
geocodeAddressString ( addressString, in: region, completionHandler: seal. resolve)
42
42
}
43
43
}
0 commit comments