mirror of
https://github.com/apple/swift-http-structured-headers
synced 2026-11-24 04:37:50 +00:00
Remove Swift 5.5 Dockerfile (#34)
* Remove Swift 5.5 Dockerfile Motivation: Swift 5.5 is no longer supported. Modifications: Remove Swift 5.5 Dockerfile Result: Swift 5.5 support fully removed * Remove SHSendable --------- Co-authored-by: Cory Benfield <lukasa@apple.com>
This commit is contained in:
1 parent
e8c756ea88
commit
ef88c2245f
10 files changed
+16
-58
No files matched your search
@@ -21,7 +21,7 @@
|
||||
|
||||
/// `ItemOrInnerList` represents the values in a structured header dictionary, or the
|
||||
/// entries in a structured header list.
|
||||
public enum ItemOrInnerList: SHSendable {
|
||||
public enum ItemOrInnerList: Sendable {
|
||||
case item(Item)
|
||||
case innerList(InnerList)
|
||||
}
|
||||
@@ -32,7 +32,7 @@ extension ItemOrInnerList: Hashable {}
|
||||
|
||||
/// `BareItem` is a representation of the base data types at the bottom of a structured
|
||||
/// header field. These types are not parameterised: they are raw data.
|
||||
public enum BareItem: SHSendable {
|
||||
public enum BareItem: Sendable {
|
||||
/// A boolean item.
|
||||
case bool(Bool)
|
||||
|
||||
@@ -87,7 +87,7 @@ extension BareItem: Hashable {}
|
||||
|
||||
/// `Item` represents a structured header field item: a combination of a `bareItem`
|
||||
/// and some parameters.
|
||||
public struct Item: SHSendable {
|
||||
public struct Item: Sendable {
|
||||
/// The `BareItem` that this `Item` contains.
|
||||
public var bareItem: BareItem
|
||||
|
||||
@@ -106,7 +106,7 @@ extension Item: Hashable {}
|
||||
|
||||
/// A `BareInnerList` represents the items contained within an ``InnerList``, without
|
||||
/// the associated parameters.
|
||||
public struct BareInnerList: Hashable, SHSendable {
|
||||
public struct BareInnerList: Hashable, Sendable {
|
||||
private var items: [Item]
|
||||
|
||||
public init() {
|
||||
@@ -179,7 +179,7 @@ extension BareInnerList.Index: Comparable {
|
||||
// MARK: - InnerList
|
||||
|
||||
/// An `InnerList` is a list of items, with some associated parameters.
|
||||
public struct InnerList: Hashable, SHSendable {
|
||||
public struct InnerList: Hashable, Sendable {
|
||||
/// The items contained within this inner list.
|
||||
public var bareInnerList: BareInnerList
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
// MARK: - StructuredHeaderError
|
||||
|
||||
/// Errors that may be encountered when working with structured headers.
|
||||
public struct StructuredHeaderError: Error, SHSendable {
|
||||
public struct StructuredHeaderError: Error, Sendable {
|
||||
private enum _BaseError: Hashable {
|
||||
case invalidTrailingBytes
|
||||
case invalidInnerList
|
||||
|
||||
@@ -25,7 +25,7 @@ public struct StructuredFieldValueParser<BaseData: RandomAccessCollection> where
|
||||
}
|
||||
}
|
||||
|
||||
extension StructuredFieldValueParser: SHSendable where BaseData: SHSendable, BaseData.SubSequence: SHSendable {}
|
||||
extension StructuredFieldValueParser: Sendable where BaseData: Sendable, BaseData.SubSequence: Sendable {}
|
||||
|
||||
extension StructuredFieldValueParser {
|
||||
// Helper typealiases to avoid the explosion of generic parameters
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
private let validIntegerRange = Int64(-999_999_999_999_999) ... Int64(999_999_999_999_999)
|
||||
|
||||
/// A `StructuredFieldValueSerializer` is the basic parsing object for structured header field values.
|
||||
public struct StructuredFieldValueSerializer: SHSendable {
|
||||
public struct StructuredFieldValueSerializer: Sendable {
|
||||
private var data: [UInt8]
|
||||
|
||||
public init() {
|
||||
|
||||
@@ -67,14 +67,14 @@ extension OrderedMap {
|
||||
}
|
||||
}
|
||||
|
||||
extension OrderedMap: SHSendable where Key: SHSendable, Value: SHSendable {}
|
||||
extension OrderedMap: Sendable where Key: Sendable, Value: Sendable {}
|
||||
|
||||
extension OrderedMap.Entry: SHSendable where Key: SHSendable, Value: SHSendable {}
|
||||
extension OrderedMap.Entry: Sendable where Key: Sendable, Value: Sendable {}
|
||||
|
||||
// MARK: - Collection conformances
|
||||
|
||||
extension OrderedMap: RandomAccessCollection, MutableCollection {
|
||||
public struct Index: SHSendable {
|
||||
public struct Index: Sendable {
|
||||
fileprivate var baseIndex: Array<(Key, Value)>.Index
|
||||
|
||||
fileprivate init(_ baseIndex: Array<(Key, Value)>.Index) {
|
||||
|
||||
@@ -34,7 +34,7 @@ import Glibc
|
||||
/// is 999,999,999,999,999. The exponent ranges from -3 to 0. Additionally, there may be no more than 12 decimal digits before
|
||||
/// the decimal place, so while the maximum value of the significand is 999,999,999,999,999, that is only acceptable if the
|
||||
/// exponent is -3.
|
||||
public struct PseudoDecimal: Hashable, SHSendable {
|
||||
public struct PseudoDecimal: Hashable, Sendable {
|
||||
private var _mantissa: Int64
|
||||
|
||||
private var _exponent: Int8
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This source file is part of the SwiftNIO open source project
|
||||
//
|
||||
// Copyright (c) 2022 Apple Inc. and the SwiftNIO project authors
|
||||
// Licensed under Apache License v2.0
|
||||
//
|
||||
// See LICENSE.txt for license information
|
||||
// See CONTRIBUTORS.txt for the list of SwiftNIO project authors
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#if swift(>=5.5) && canImport(_Concurrency)
|
||||
public typealias SHSendable = Sendable
|
||||
#else
|
||||
public typealias SHSendable = Any
|
||||
#endif
|
||||
@@ -16,7 +16,7 @@ import RawStructuredFieldValues
|
||||
|
||||
/// A `StructuredFieldValueDecoder` allows decoding `Decodable` objects from a HTTP
|
||||
/// structured header field.
|
||||
public struct StructuredFieldValueDecoder: SHSendable {
|
||||
public struct StructuredFieldValueDecoder: Sendable {
|
||||
/// A strategy that should be used to map coding keys to wire format keys.
|
||||
public var keyDecodingStrategy: KeyDecodingStrategy?
|
||||
|
||||
@@ -25,7 +25,7 @@ public struct StructuredFieldValueDecoder: SHSendable {
|
||||
|
||||
extension StructuredFieldValueDecoder {
|
||||
/// A strategy that should be used to map coding keys to wire format keys.
|
||||
public struct KeyDecodingStrategy: Hashable, SHSendable {
|
||||
public struct KeyDecodingStrategy: Hashable, Sendable {
|
||||
fileprivate enum Base: Hashable {
|
||||
case lowercase
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ import RawStructuredFieldValues
|
||||
|
||||
/// A `StructuredFieldValueEncoder` allows encoding `Encodable` objects to the format of a HTTP
|
||||
/// structured header field.
|
||||
public struct StructuredFieldValueEncoder: SHSendable {
|
||||
public struct StructuredFieldValueEncoder: Sendable {
|
||||
public var keyEncodingStrategy: KeyEncodingStrategy?
|
||||
|
||||
public init() {}
|
||||
@@ -24,7 +24,7 @@ public struct StructuredFieldValueEncoder: SHSendable {
|
||||
|
||||
extension StructuredFieldValueEncoder {
|
||||
/// A strategy that should be used to map coding keys to wire format keys.
|
||||
public struct KeyEncodingStrategy: Hashable, SHSendable {
|
||||
public struct KeyEncodingStrategy: Hashable, Sendable {
|
||||
fileprivate enum Base: Hashable {
|
||||
case lowercase
|
||||
}
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
|
||||
runtime-setup:
|
||||
image: swift-http-structured-headers:20.04-5.5
|
||||
build:
|
||||
args:
|
||||
swift_version: "5.5"
|
||||
ubuntu_version: "focal"
|
||||
|
||||
unit-tests:
|
||||
image: swift-http-structured-headers:20.04-5.5
|
||||
|
||||
documentation-check:
|
||||
image: swift-http-structured-headers:20.04-5.5
|
||||
|
||||
test:
|
||||
image: swift-http-structured-headers:20.04-5.5
|
||||
|
||||
shell:
|
||||
image: swift-http-structured-headers:20.04-5.5
|
||||
|
||||
Reference in new issue
Block a user