diff --git a/.swift-version b/.swift-version
index bf77d54..819e07a 100644
--- a/.swift-version
+++ b/.swift-version
@@ -1 +1 @@
-4.2
+5.0
diff --git a/Algorithm.podspec b/Algorithm.podspec
index 5f24199..6b8144a 100644
--- a/Algorithm.podspec
+++ b/Algorithm.podspec
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|
s.name = 'Algorithm'
- s.version = '3.0'
- s.swift_version = '4.2'
+ s.version = '3.1'
+ s.swift_version = '5.0'
s.license = 'BSD-3-Clause'
s.summary = 'A toolset for writing algorithms in Swift.'
s.homepage = 'http://algorithmswift.io'
diff --git a/Algorithm.xcodeproj/project.pbxproj b/Algorithm.xcodeproj/project.pbxproj
index b1e4700..375d13d 100644
--- a/Algorithm.xcodeproj/project.pbxproj
+++ b/Algorithm.xcodeproj/project.pbxproj
@@ -374,17 +374,19 @@
TargetAttributes = {
65744C9B1C554BA50011C977 = {
CreatedOnToolsVersion = 7.2;
- LastSwiftMigration = 0800;
+ LastSwiftMigration = 1020;
};
65744CA51C554BA50011C977 = {
CreatedOnToolsVersion = 7.2;
- LastSwiftMigration = 0800;
+ LastSwiftMigration = 1020;
};
65744CC51C554E370011C977 = {
CreatedOnToolsVersion = 7.2;
+ LastSwiftMigration = 1020;
};
65744CCE1C554E380011C977 = {
CreatedOnToolsVersion = 7.2;
+ LastSwiftMigration = 1020;
};
};
};
@@ -669,8 +671,7 @@
PRODUCT_NAME = Algorithm;
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
- SWIFT_SWIFT3_OBJC_INFERENCE = Off;
- SWIFT_VERSION = 4.2;
+ SWIFT_VERSION = 5.0;
};
name = Debug;
};
@@ -689,8 +690,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.cosmicmind.Algorithm;
PRODUCT_NAME = Algorithm;
SKIP_INSTALL = YES;
- SWIFT_SWIFT3_OBJC_INFERENCE = Off;
- SWIFT_VERSION = 4.2;
+ SWIFT_VERSION = 5.0;
};
name = Release;
};
@@ -703,7 +703,7 @@
PRODUCT_BUNDLE_IDENTIFIER = io.cosmicmind.AlgorithmTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
- SWIFT_VERSION = 4.2;
+ SWIFT_VERSION = 5.0;
};
name = Debug;
};
@@ -715,7 +715,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = io.cosmicmind.AlgorithmTests;
PRODUCT_NAME = "$(TARGET_NAME)";
- SWIFT_VERSION = 4.2;
+ SWIFT_VERSION = 5.0;
};
name = Release;
};
@@ -738,8 +738,7 @@
SDKROOT = macosx;
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
- SWIFT_SWIFT3_OBJC_INFERENCE = Off;
- SWIFT_VERSION = 4.2;
+ SWIFT_VERSION = 5.0;
};
name = Debug;
};
@@ -761,8 +760,7 @@
PRODUCT_NAME = Algorithm;
SDKROOT = macosx;
SKIP_INSTALL = YES;
- SWIFT_SWIFT3_OBJC_INFERENCE = Off;
- SWIFT_VERSION = 4.2;
+ SWIFT_VERSION = 5.0;
};
name = Release;
};
@@ -779,7 +777,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
- SWIFT_VERSION = 4.2;
+ SWIFT_VERSION = 5.0;
};
name = Debug;
};
@@ -795,7 +793,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "io.cosmicmind.Algorithm-OSXTests";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
- SWIFT_VERSION = 4.2;
+ SWIFT_VERSION = 5.0;
};
name = Release;
};
diff --git a/Sources/Algorithm+Array.swift b/Sources/Algorithm+Array.swift
index 85569b9..5f69e3c 100644
--- a/Sources/Algorithm+Array.swift
+++ b/Sources/Algorithm+Array.swift
@@ -32,7 +32,7 @@ extension Array where Element: Equatable {
*/
@discardableResult
mutating func remove(object: Element) -> Element? {
- return index(of: object).map { self.remove(at: $0) }
+ return firstIndex(of: object).map { self.remove(at: $0) }
}
/**
diff --git a/Sources/Info.plist b/Sources/Info.plist
index 21baa19..543e5f9 100644
--- a/Sources/Info.plist
+++ b/Sources/Info.plist
@@ -15,7 +15,7 @@
CFBundlePackageType
FMWK
CFBundleShortVersionString
- 3.0
+ 3.1.0
CFBundleSignature
????
CFBundleVersion