From 03a7ec86eb1cd6714f210fb447afc3dde0eda373 Mon Sep 17 00:00:00 2001 From: Dan Halliday Date: Tue, 20 Feb 2024 12:16:02 +0000 Subject: [PATCH 1/2] Add Sendable conformance to Version --- Sources/Version.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Version.swift b/Sources/Version.swift index 6fabaef..4ee3776 100644 --- a/Sources/Version.swift +++ b/Sources/Version.swift @@ -15,7 +15,7 @@ A struct representing a “semver” version, that is: a Semantic Version. - SeeAlso: https://semver.org */ -public struct Version { +public struct Version: Sendable { /// The major version. public let major: Int From ca943a93fd9b4f9ba8dfb213b36f49e409d559a6 Mon Sep 17 00:00:00 2001 From: Max Howell Date: Mon, 16 Sep 2024 11:43:15 -0400 Subject: [PATCH 2/2] Only conform Sendable if Swift >=5.5 --- Sources/Version.swift | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Sources/Version.swift b/Sources/Version.swift index 4ee3776..fea9375 100644 --- a/Sources/Version.swift +++ b/Sources/Version.swift @@ -15,7 +15,8 @@ A struct representing a “semver” version, that is: a Semantic Version. - SeeAlso: https://semver.org */ -public struct Version: Sendable { + +public struct Version { /// The major version. public let major: Int @@ -193,3 +194,7 @@ public extension Version { buildMetadataIdentifiers = [] } } + +#if swift(>=5.5) +extension Version: Sendable {} +#endif