Skip to content

Commit 5aa5917

Browse files
author
Clément Le Provost
committed
Fix compilation error in Release configuration
When assertions were compiled out, the control flow would escape the `else` clause of a `guard` statement.
1 parent 7928d8a commit 5aa5917

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Source/Offline/MirroredIndex.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -759,11 +759,12 @@ import Foundation
759759
}
760760

761761
let (queryContent, queryError) = self._searchOffline(query)
762+
assert(queryContent != nil || queryError != nil)
762763
if queryError != nil {
763764
error = queryError
764765
break
765766
}
766-
guard var returnedContent = queryContent else { assert(false, "Should never happen") }
767+
var returnedContent = queryContent!
767768
returnedContent["index"] = self.indexName
768769
results.append(returnedContent)
769770

0 commit comments

Comments
 (0)