Skip to content

Commit 894eefb

Browse files
author
Clément Le Provost
committed
Make completion handler mandatory on multiple queries
**WARNING: Breaking change.** Multiple queries are just aggregated search queries, so it does not make any sense to ignore the results. Furthermore, it contradicts the convention adopted in the rest of the code.
1 parent 66543c8 commit 894eefb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Source/Client.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ import Foundation
240240
/// - parameter completionHandler: Completion handler to be notified of the request's outcome.
241241
/// - returns: A cancellable operation.
242242
///
243-
@objc public func multipleQueries(queries: [IndexQuery], strategy: String?, completionHandler: CompletionHandler? = nil) -> NSOperation {
243+
@objc public func multipleQueries(queries: [IndexQuery], strategy: String?, completionHandler: CompletionHandler) -> NSOperation {
244244
// IMPLEMENTATION NOTE: Objective-C bridgeable alternative.
245245
var path = "1/indexes/*/queries"
246246
if strategy != nil {
@@ -265,7 +265,7 @@ import Foundation
265265
/// - parameter completionHandler: Completion handler to be notified of the request's outcome.
266266
/// - returns: A cancellable operation.
267267
///
268-
public func multipleQueries(queries: [IndexQuery], strategy: MultipleQueriesStrategy? = nil, completionHandler: CompletionHandler? = nil) -> NSOperation {
268+
public func multipleQueries(queries: [IndexQuery], strategy: MultipleQueriesStrategy? = nil, completionHandler: CompletionHandler) -> NSOperation {
269269
// IMPLEMENTATION NOTE: Not Objective-C bridgeable because of enum.
270270
return multipleQueries(queries, strategy: strategy?.rawValue, completionHandler: completionHandler)
271271
}

0 commit comments

Comments
 (0)