[RFC 9651] Implement adjustments for backward compatible update (#40)

Motivation:

`swift-http-structured-headers` has to be updated to [RFC 9651](https://www.ietf.org/rfc/rfc9651.html). And it will be convenient for users to have this update as a SemVer minor.

Modifications:

- Deprecate the `BareItem` type and replace it with `RFC9651BareItem`, retaining existing behaviours. Updates for the new RFC will be based on `RFC9651BareItem`.

Result:

The library can be updated to the new RFC in a backward-compatible manner.
This commit is contained in:
Clinton Nkwocha authored and GitHub committed 2024-10-23 10:56:35 +01:00
1 parent 8cc27e208a
commit f069b10a87
11 files changed
+218 -53

No files matched your search

@@ -15,11 +15,11 @@ import Foundation
import RawStructuredFieldValues
struct BareItemDecoder {
private var item: BareItem
private var item: RFC9651BareItem
private var _codingPath: [_StructuredHeaderCodingKey]
init(_ item: BareItem, codingPath: [_StructuredHeaderCodingKey]) {
init(_ item: RFC9651BareItem, codingPath: [_StructuredHeaderCodingKey]) {
self.item = item
self._codingPath = codingPath
}