Skip to content

Commit

Permalink
Update to swift 5
Browse files Browse the repository at this point in the history
  • Loading branch information
e-marchand committed Mar 27, 2019
1 parent 7c30e1a commit e8789d1
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .swift-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.2
5.0
2 changes: 1 addition & 1 deletion Prephirences.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Pod::Spec.new do |s|

# ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
s.name = "Prephirences"
s.version = "4.2.1"
s.version = "5.0.0"
s.summary = "A Swift library to manage preferences"
s.description = <<-DESC
Prephirences is a Swift library that provides useful protocols and methods to manage preferences.
Expand Down
30 changes: 16 additions & 14 deletions Prephirences.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -599,9 +599,11 @@
};
C42114FD1AE7D8E200A09DD9 = {
CreatedOnToolsVersion = 6.3;
LastSwiftMigration = 1020;
};
C42DB81020E26123004380CC = {
CreatedOnToolsVersion = 9.4.1;
LastSwiftMigration = 1020;
ProvisioningStyle = Automatic;
};
C4FF650A1B6B7C7300BFE4F4 = {
Expand Down Expand Up @@ -875,7 +877,7 @@
PRODUCT_NAME = Prephirences;
SDKROOT = watchos;
SKIP_INSTALL = YES;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 4;
WATCHOS_DEPLOYMENT_TARGET = 3.0;
};
Expand All @@ -897,7 +899,7 @@
PRODUCT_NAME = Prephirences;
SDKROOT = watchos;
SKIP_INSTALL = YES;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 4;
VALIDATE_PRODUCT = YES;
WATCHOS_DEPLOYMENT_TARGET = 3.0;
Expand All @@ -921,7 +923,7 @@
SDKROOT = appletvos;
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 9.2;
};
Expand All @@ -943,7 +945,7 @@
PRODUCT_NAME = Prephirences;
SDKROOT = appletvos;
SKIP_INSTALL = YES;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 9.2;
VALIDATE_PRODUCT = YES;
Expand Down Expand Up @@ -1003,7 +1005,7 @@
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
Expand Down Expand Up @@ -1054,7 +1056,7 @@
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
Expand Down Expand Up @@ -1082,7 +1084,7 @@
PRODUCT_NAME = Prephirences;
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
Expand All @@ -1104,7 +1106,7 @@
PRODUCT_NAME = Prephirences;
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
Expand All @@ -1130,7 +1132,7 @@
PRODUCT_BUNDLE_IDENTIFIER = tv.phimage.Prephirences;
PRODUCT_NAME = Prephirences;
SKIP_INSTALL = YES;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -1150,7 +1152,7 @@
PRODUCT_BUNDLE_IDENTIFIER = tv.phimage.Prephirences;
PRODUCT_NAME = Prephirences;
SKIP_INSTALL = YES;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand All @@ -1173,7 +1175,7 @@
PRODUCT_BUNDLE_IDENTIFIER = org.phimage.PrephirencesMacTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -1195,7 +1197,7 @@
MACOSX_DEPLOYMENT_TARGET = 10.13;
PRODUCT_BUNDLE_IDENTIFIER = org.phimage.PrephirencesMacTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand All @@ -1209,7 +1211,7 @@
PRODUCT_BUNDLE_IDENTIFIER = tv.phimage.PrephirencesiOSTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = iphoneos;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -1222,7 +1224,7 @@
PRODUCT_BUNDLE_IDENTIFIER = tv.phimage.PrephirencesiOSTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = iphoneos;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
VALIDATE_PRODUCT = YES;
};
name = Release;
Expand Down
2 changes: 1 addition & 1 deletion Sources/PatternPreferences.swift
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,7 @@ extension Collection {
}

func find(_ predicate: (Self.Iterator.Element) throws -> Bool) rethrows -> Self.Iterator.Element? {
return try index(where: predicate).map({ self[$0] })
return try firstIndex(where: predicate).map({ self[$0] })
}

}

0 comments on commit e8789d1

Please sign in to comment.