Skip to content

Commit 59c3fdf

Browse files
committed
fix protocol warnings
1 parent 885299f commit 59c3fdf

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

Sources/StructuredFieldValues/Decoder/BareItemDecoder.swift

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,18 @@ extension BareItemDecoder: SingleValueDecodingContainer {
6262
try self._decodeFixedWidthInteger(type)
6363
}
6464

65+
#if compiler(>=6.0)
66+
@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *)
67+
func decode(_ type: UInt128.Type) throws -> UInt128 {
68+
try self._decodeFixedWidthInteger(type)
69+
}
70+
71+
@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *)
72+
func decode(_ type: Int128.Type) throws -> Int128 {
73+
try self._decodeFixedWidthInteger(type)
74+
}
75+
#endif
76+
6577
func decode(_ type: UInt.Type) throws -> UInt {
6678
try self._decodeFixedWidthInteger(type)
6779
}

Sources/StructuredFieldValues/Encoder/StructuredFieldValueEncoder.swift

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,13 @@ extension _StructuredFieldEncoder: SingleValueEncodingContainer {
260260
try self._encodeFixedWidthInteger(value)
261261
}
262262

263+
#if compiler(>=6.0)
264+
@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *)
265+
func encode(_ value: Int128) throws {
266+
try self._encodeFixedWidthInteger(value)
267+
}
268+
#endif
269+
263270
func encode(_ value: UInt) throws {
264271
try self._encodeFixedWidthInteger(value)
265272
}
@@ -280,6 +287,13 @@ extension _StructuredFieldEncoder: SingleValueEncodingContainer {
280287
try self._encodeFixedWidthInteger(value)
281288
}
282289

290+
#if compiler(>=6.0)
291+
@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *)
292+
func encode(_ value: UInt128) throws {
293+
try self._encodeFixedWidthInteger(value)
294+
}
295+
#endif
296+
283297
func encode(_ data: Data) throws {
284298
let encoded = data.base64EncodedString()
285299
try self.currentStackEntry.storage.insertBareItem(.undecodedByteSequence(encoded))

0 commit comments

Comments
 (0)