Skip to content

Commit 1636285

Browse files
authored
fix: don't lint DerivedData and remove force unwrapping (#304)
1 parent 931ae8f commit 1636285

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.swiftlint.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ disabled_rules:
77
- comment_spacing
88
excluded: # paths to ignore during linting. Takes precedence over `included`.
99
- Tests/ParseSwiftTests/ParseEncoderTests
10+
- DerivedData

Sources/ParseSwift/Types/QueryWhere.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ struct QueryWhere: Encodable, Equatable {
2121
var container = encoder.container(keyedBy: RawCodingKey.self)
2222
try constraints.forEach { (key, value) in
2323
try value.forEach { (constraint) in
24-
if constraint.comparator != nil {
24+
if let comparator = constraint.comparator {
2525
var nestedContainer = container.nestedContainer(keyedBy: QueryConstraint.Comparator.self,
26-
forKey: .key(key))
27-
try constraint.encode(to: nestedContainer.superEncoder(forKey: constraint.comparator!))
26+
forKey: .key(key))
27+
try constraint.encode(to: nestedContainer.superEncoder(forKey: comparator))
2828
} else {
2929
try container.encode(constraint, forKey: .key(key))
3030
}

0 commit comments

Comments
 (0)