Skip to content

Commit 9457574

Browse files
jtbandesparkera
authored andcommitted
[SE-0121] remove uses of optional comparison operators (#459)
1 parent 80f1052 commit 9457574

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Foundation/NSCalendar.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -831,8 +831,8 @@ public class Calendar: NSObject, NSCopying, NSSecureCoding {
831831
let comp2 = components(reducedUnits, from: date2)!
832832

833833
for unit in units {
834-
let value1 = comp1.value(forComponent: unit)
835-
let value2 = comp2.value(forComponent: unit)
834+
let value1 = comp1.value(forComponent: unit)!
835+
let value2 = comp2.value(forComponent: unit)!
836836
if value1 > value2 {
837837
return .orderedDescending
838838
} else if value1 < value2 {

0 commit comments

Comments
 (0)