Skip to content

Commit a8abc6c

Browse files
author
Lukas Schmidt
committed
remove explicit casting in favor of conditional casting
1 parent 3d0f29e commit a8abc6c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Foundation/NSDictionary.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,10 +243,9 @@ public class NSDictionary : NSObject, NSCopying, NSMutableCopying, NSSecureCodin
243243
}
244244

245245
public override func isEqual(object: AnyObject?) -> Bool {
246-
guard let otherObject = object where otherObject is NSDictionary else {
246+
guard let otherDictionary = object as? NSDictionary else {
247247
return false
248248
}
249-
let otherDictionary = otherObject as! NSDictionary
250249
return self.isEqualToDictionary(otherDictionary.bridge())
251250
}
252251

0 commit comments

Comments
 (0)