Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
test-on-macos:
strategy:
matrix:
xcode-version: ['16.3']
xcode-version: ['16.4', '16.2']
runs-on: macos-15
timeout-minutes: 3
env:
Expand All @@ -23,7 +23,7 @@ jobs:
test-on-linux:
strategy:
matrix:
swift-version: ['6.1', '6.0', '5.10']
swift-version: ['6.1', '6.0']
runs-on: ubuntu-latest
timeout-minutes: 3
steps:
Expand Down
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// swift-tools-version: 5.8
// swift-tools-version: 6.0

import PackageDescription

let package = Package(
name: "Hex.swift",
platforms: [
.iOS(.v12), .tvOS(.v12), .watchOS(.v4), .macOS(.v10_13),
.iOS(.v14), .tvOS(.v14), .watchOS(.v7), .macOS(.v11), .macCatalyst(.v14),
],
products: [
.library(name: "Hex", targets: ["Hex"])
Expand Down
1 change: 0 additions & 1 deletion Sources/Hex/Collection+Hex.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ extension Collection<UInt8> {
///
/// - Parameter options: Encoding options. Default value is `[]`.
@inlinable
@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *)
public func hexEncodedString(options: Base16.EncodingOptions = []) -> String {
let capacity = Base16.estimateEncodedCount(bytes: count)
return String(unsafeUninitializedCapacity: capacity) { buffer in
Expand Down
2 changes: 0 additions & 2 deletions Sources/Hex/Sequence+Hex.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,9 @@ extension Sequence<UInt8> {
public func hexEncodedString(options: Base16.EncodingOptions = []) -> String {
let seq = Base16EncodingSequence(sequence: self, options: options)

#if compiler(>=6.0)
if #available(iOS 18.0, macOS 15.0, tvOS 18.0, visionOS 2.0, watchOS 11.0, *) {
return String(validating: seq, as: UTF8.self).unsafelyUnwrapped
}
#endif

return String(bytes: seq, encoding: .utf8).unsafelyUnwrapped
}
Expand Down
4 changes: 0 additions & 4 deletions Tests/HexTests/Base16Tests.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#if compiler(>=6.0)

import Foundation
import Hex
import Testing
Expand Down Expand Up @@ -64,5 +62,3 @@ struct Base16Tests {
#expect(result == .error)
}
}

#endif
4 changes: 0 additions & 4 deletions Tests/HexTests/Collection+HexTests.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#if compiler(>=6.0)

import Foundation
import Hex
import Testing
Expand Down Expand Up @@ -60,5 +58,3 @@ struct CollectionHexTests {
#expect(hexString == "")
}
}

#endif
4 changes: 0 additions & 4 deletions Tests/HexTests/Data+HexTests.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#if compiler(>=6.0)

import Foundation
import Hex
import Testing
Expand Down Expand Up @@ -126,5 +124,3 @@ struct DataHexTests {
#expect(data == nil)
}
}

#endif
4 changes: 0 additions & 4 deletions Tests/HexTests/JSONTests.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#if compiler(>=6.0)

import Foundation
import Hex
import Testing
Expand Down Expand Up @@ -123,5 +121,3 @@ struct JSONTests {
#expect(String(decoding: string, as: UTF8.self) == #"["313233344a4b4c4d"]"#)
}
}

#endif
4 changes: 0 additions & 4 deletions Tests/HexTests/Sequence+HexTests.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#if compiler(>=6.0)

import Foundation
import Hex
import Testing
Expand Down Expand Up @@ -60,5 +58,3 @@ struct SequenceHexTests {
#expect(hexString == "")
}
}

#endif
4 changes: 2 additions & 2 deletions benchmark.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ mkdir -p ./benchmark/Sources/benchmark
cd benchmark

cat << EOF > ./Package.swift
// swift-tools-version: 5.8
// swift-tools-version: 6.0

import PackageDescription

let package = Package(
name: "benchmark",
platforms: [.macOS(.v11)],
platforms: [.macOS(.v15)],
dependencies: [
$PACKAGE
],
Expand Down