From 707470038c4385854b5637b6cb57e7ac4e41f948 Mon Sep 17 00:00:00 2001 From: Rick Newton-Rogers Date: Fri, 28 Mar 2025 15:57:50 +0000 Subject: [PATCH] Update FieldParser.swift availability guard Update FieldParser.swift availability guard for ``` String(unsafeUninitializedCapacity: unescapedBytes.count) ``` which is only available on Mac Catalyst 14.0 or later --- Sources/RawStructuredFieldValues/FieldParser.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/RawStructuredFieldValues/FieldParser.swift b/Sources/RawStructuredFieldValues/FieldParser.swift index 9fed003..c2c268b 100644 --- a/Sources/RawStructuredFieldValues/FieldParser.swift +++ b/Sources/RawStructuredFieldValues/FieldParser.swift @@ -639,7 +639,7 @@ extension String { // We assume the string is previously validated, so the escapes are easily removed. See the doc comment for // `StrippingStringEscapesCollection` for more details on what we're doing here. let unescapedBytes = StrippingStringEscapesCollection(bytes, escapes: escapes) - if #available(macOS 10.16, macCatalyst 10.16, iOS 14.0, watchOS 7.0, tvOS 14.0, *) { + if #available(macOS 10.16, macCatalyst 14.0, iOS 14.0, watchOS 7.0, tvOS 14.0, *) { return String(unsafeUninitializedCapacity: unescapedBytes.count) { innerPtr in let (_, endIndex) = innerPtr.initialize(from: unescapedBytes) return endIndex