Skip to content

Commit e12b88f

Browse files
committed
Move the where for Swift 5.2
1 parent 3a15233 commit e12b88f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/ParseSwift/Protocols/ParseQueryScorable.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ public protocol ParseQueryScorable {
2222
}
2323

2424
// MARK: ParseQueryScorable
25-
extension Query {
25+
extension Query where T: ParseObject & ParseQueryScorable {
2626
/**
2727
Method to sort the full text search by text score.
2828
- parameter value: String or Object of index that should be used when executing query.
2929
- note: Your `ParseObject` should conform to `ParseQueryScorable` to retrieve
3030
the weight/rank via the "score" property of your `ParseObject`.
3131
*/
32-
public func sortByTextScore() -> Query<T> where T: ParseObject & ParseQueryScorable {
32+
public func sortByTextScore() -> Query<T> {
3333
var mutableQuery = self
3434
let ascendingScore = Order.ascending(QueryConstraint.Comparator.score.rawValue)
3535
if mutableQuery.order != nil {

0 commit comments

Comments
 (0)