From 19e94393be4383d8f9ebec2393228bf11ccb4e12 Mon Sep 17 00:00:00 2001 From: Christos Laggouras Date: Thu, 25 Apr 2019 14:35:18 +0300 Subject: [PATCH] Convert to swift 5 --- Example/Pods/Pods.xcodeproj/project.pbxproj | 9 ++++----- Fuse/Classes/Fuse.swift | 2 +- Fuse/Classes/FuseUtilities.swift | 4 ++-- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Example/Pods/Pods.xcodeproj/project.pbxproj b/Example/Pods/Pods.xcodeproj/project.pbxproj index 4db8753..55801e4 100644 --- a/Example/Pods/Pods.xcodeproj/project.pbxproj +++ b/Example/Pods/Pods.xcodeproj/project.pbxproj @@ -328,7 +328,7 @@ LastUpgradeCheck = 0940; TargetAttributes = { B8CD3B3EDB42EEABB2D487F8706AF6BB = { - LastSwiftMigration = 0940; + LastSwiftMigration = 1020; }; }; }; @@ -337,6 +337,7 @@ developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( + English, en, ); mainGroup = 7DB346D0F39D3F0E887471402A8071AB; @@ -424,8 +425,7 @@ SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_SWIFT3_OBJC_INFERENCE = On; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -687,8 +687,7 @@ SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_SWIFT3_OBJC_INFERENCE = On; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; diff --git a/Fuse/Classes/Fuse.swift b/Fuse/Classes/Fuse.swift index 08de08c..e219fd4 100644 --- a/Fuse/Classes/Fuse.swift +++ b/Fuse/Classes/Fuse.swift @@ -113,7 +113,7 @@ public class Fuse { // Exact match if (pattern.text == text) { - return (0, [CountableClosedRange(0...textLength - 1)]) + return (0, [0...textLength - 1]) } let location = self.location diff --git a/Fuse/Classes/FuseUtilities.swift b/Fuse/Classes/FuseUtilities.swift index 99be1a9..e3ea3b6 100644 --- a/Fuse/Classes/FuseUtilities.swift +++ b/Fuse/Classes/FuseUtilities.swift @@ -63,12 +63,12 @@ class FuseUtilities { start = n } else if bit == 0 && start != -1 { end = n - 1 - ranges.append(CountableClosedRange(start...end)) + ranges.append(start...end) start = -1 } } if mask.last == 1 { - ranges.append(CountableClosedRange(start...mask.count - 1)) + ranges.append(start...mask.count - 1) } return ranges }