Skip to content

Commit 1d26dfd

Browse files
author
Dave Abrahams
committed

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Foundation/NSCompoundPredicate.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ public class CompoundPredicate : Predicate {
4848
override public func evaluate(with object: AnyObject?, substitutionVariables bindings: [String : AnyObject]?) -> Bool {
4949
switch compoundPredicateType {
5050
case .and:
51-
return subpredicates.reduce(true, combine: {
51+
return subpredicates.reduce(true, {
5252
$0 && $1.evaluate(with: object, substitutionVariables: bindings)
5353
})
5454
case .or:
55-
return subpredicates.reduce(false, combine: {
55+
return subpredicates.reduce(false, {
5656
$0 || $1.evaluate(with: object, substitutionVariables: bindings)
5757
})
5858
case .not:

Foundation/NSKeyedArchiver.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -632,14 +632,14 @@ public class NSKeyedArchiver : NSCoder {
632632
}
633633

634634
public override func encodePropertyList(_ aPropertyList: AnyObject) {
635-
if !NSPropertyListClasses.contains({ $0 == aPropertyList.dynamicType }) {
635+
if !NSPropertyListClasses.contains(where: { $0 == aPropertyList.dynamicType }) {
636636
fatalError("Cannot encode non-property list type \(aPropertyList.dynamicType) as property list")
637637
}
638638
encode(aPropertyList)
639639
}
640640

641641
public func encodePropertyList(_ aPropertyList: AnyObject, forKey key: String) {
642-
if !NSPropertyListClasses.contains({ $0 == aPropertyList.dynamicType }) {
642+
if !NSPropertyListClasses.contains(where: { $0 == aPropertyList.dynamicType }) {
643643
fatalError("Cannot encode non-property list type \(aPropertyList.dynamicType) as property list")
644644
}
645645
encode(aPropertyList, forKey: key)

Foundation/NSKeyedUnarchiver.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ public class NSKeyedUnarchiver : NSCoder {
242242

243243
if _flags.contains(UnarchiverFlags.RequiresSecureCoding) {
244244
if let unwrappedAllowedClasses = allowedClasses {
245-
if unwrappedAllowedClasses.contains({NSKeyedUnarchiver._classIsKindOfClass(assertedClass!, $0)}) {
245+
if unwrappedAllowedClasses.contains(where: {NSKeyedUnarchiver._classIsKindOfClass(assertedClass!, $0)}) {
246246
return true
247247
}
248248
}

0 commit comments

Comments
 (0)