diff --git a/Package.swift b/Package.swift index 0f6a5b7..3edeae2 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.5 +// swift-tools-version: 5.8 import PackageDescription @@ -13,3 +13,13 @@ let package = Package( .testTarget(name: "RearrangeTests", dependencies: ["Rearrange"]), ] ) + +let swiftSettings: [SwiftSetting] = [ + .enableExperimentalFeature("StrictConcurrency") +] + +for target in package.targets { + var settings = target.swiftSettings ?? [] + settings.append(contentsOf: swiftSettings) + target.swiftSettings = settings +} diff --git a/README.md b/README.md index c91194c..15db146 100644 --- a/README.md +++ b/README.md @@ -92,16 +92,6 @@ subscript(range: Range) -> Substring? subscript(range: NSRange) -> Substring? ``` -**NSTextLocation** - -```swift -static func < (lhs: Self, rhs: Self) -> Bool -static func == (lhs: Self, rhs: Self) -> Bool -static func <= (lhs: Self, rhs: Self) -> Bool -static func > (lhs: Self, rhs: Self) -> Bool -static func >= (lhs: Self, rhs: Self) -> Bool -``` - ## Contributing and Collaboration I would love to hear from you! Issues, Discussions, or pull requests work great. A [Discord server][discord] is also available for live help, but I have a strong bias towards answering in the form of documentation. diff --git a/Sources/Rearrange/NSTextLocation+Comparable.swift b/Sources/Rearrange/NSTextLocation+Comparable.swift deleted file mode 100644 index 0aed086..0000000 --- a/Sources/Rearrange/NSTextLocation+Comparable.swift +++ /dev/null @@ -1,32 +0,0 @@ -#if os(macOS) && !targetEnvironment(macCatalyst) -import AppKit -#elseif os(iOS) || os(tvOS) || os(visionOS) -import UIKit -#endif - -#if os(macOS) || os(iOS) || os(tvOS) || os(visionOS) - -@available(iOS 15.0, macOS 12.0, tvOS 15.0, *) -extension NSTextLocation { - public static func < (lhs: Self, rhs: Self) -> Bool { - return lhs.compare(rhs) == .orderedAscending - } - - public static func == (lhs: Self, rhs: Self) -> Bool { - return lhs.compare(rhs) == .orderedSame - } - - public static func <= (lhs: Self, rhs: Self) -> Bool { - return lhs < rhs || lhs == rhs - } - - public static func > (lhs: Self, rhs: Self) -> Bool { - return lhs.compare(rhs) == .orderedDescending - } - - public static func >= (lhs: Self, rhs: Self) -> Bool { - return lhs > rhs || lhs > rhs - } -} - -#endif