Skip to content

Commit

Permalink
Fix some Sendable warnings on 5.10 (#3158)
Browse files Browse the repository at this point in the history
  • Loading branch information
sidepelican committed Mar 20, 2024
1 parent 3a7da19 commit 11cdb29
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Sources/Vapor/HTTP/Headers/HTTPHeaders+Connection.swift
@@ -1,7 +1,7 @@
import NIOHTTP1

extension HTTPHeaders {
public struct Connection: ExpressibleByStringLiteral, Equatable {
public struct Connection: ExpressibleByStringLiteral, Equatable, Sendable {
public static let close: Self = "close"
public static let keepAlive: Self = "keep-alive"

Expand Down
Expand Up @@ -20,7 +20,7 @@ extension HTTPHeaders {
}

public struct ContentDisposition {
public struct Value: Equatable {
public struct Value: Equatable, Sendable {
public static let inline = Value(string: "inline")
public static let attachment = Value(string: "attachment")
public static let formData = Value(string: "form-data")
Expand Down
2 changes: 1 addition & 1 deletion Sources/Vapor/HTTP/Headers/HTTPHeaders+Link.swift
Expand Up @@ -21,7 +21,7 @@ extension HTTPHeaders {
// TODO: Support multiple relations in a single `rel` attribute, as permitted by spec.
public struct Link {
/// See https://www.iana.org/assignments/link-relations/link-relations.xhtml
public struct Relation: RawRepresentable, Hashable {
public struct Relation: RawRepresentable, Hashable, Sendable {
public static let about = Relation("about")
public static let alternate = Relation("alternate")
public static let appendix = Relation("appendix")
Expand Down
2 changes: 1 addition & 1 deletion Sources/Vapor/HTTP/Headers/HTTPHeaders+Name.swift
Expand Up @@ -2,7 +2,7 @@ import NIOHTTP1

extension HTTPHeaders {
/// Type used for the name of a HTTP header in the `HTTPHeaders` storage.
public struct Name: Codable, Hashable, Equatable, CustomStringConvertible, ExpressibleByStringLiteral {
public struct Name: Codable, Hashable, Equatable, CustomStringConvertible, ExpressibleByStringLiteral, Sendable {
/// See `Hashable`
public func hash(into hasher: inout Hasher) {
self.lowercased.hash(into: &hasher)
Expand Down
2 changes: 1 addition & 1 deletion Sources/Vapor/Utilities/BaseN.swift
Expand Up @@ -7,7 +7,7 @@ import Algorithms

import struct Foundation.Data

public struct BaseNEncoding {
public struct BaseNEncoding: Sendable {
/// For a given base and count, calculate the number of values needed to encode the given count of bytes.
@inlinable
internal static func sizeEnc(for bits: Int, count: Int) -> Int {
Expand Down

0 comments on commit 11cdb29

Please sign in to comment.