Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Sendable Conformances #16

Merged
merged 1 commit into from
Sep 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Sources/MultipartFormData/Boundary.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import Foundation
/// 1. ``random()`` type method to generate a random one.
/// 2. ``init(uncheckedBoundary:)`` to create one manually.
/// In this case an error can be thrown because it checks the required format!
public struct Boundary: Hashable {
public struct Boundary: Sendable, Hashable {
internal let _asciiData: Data
}

Expand Down
2 changes: 1 addition & 1 deletion Sources/MultipartFormData/HTTPHeaderField.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import Foundation

/// A header field of an HTTP request.
public protocol HTTPHeaderField: Hashable, CustomDebugStringConvertible {
public protocol HTTPHeaderField: Sendable, Hashable, CustomDebugStringConvertible {

/// The name of the header field.
///
Expand Down
2 changes: 1 addition & 1 deletion Sources/MultipartFormData/HTTPHeaderParameter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//

/// A parameter for an ``HTTPHeaderField``.
public struct HTTPHeaderParameter: Hashable {
public struct HTTPHeaderParameter: Sendable, Hashable {

/// The name of the parameter.
public var name: String
Expand Down
2 changes: 1 addition & 1 deletion Sources/MultipartFormData/MediaType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
///
/// The most common once's are conveniently available through type properties.
/// These can also be extended to avoid mistakes.
public struct MediaType: Hashable {
public struct MediaType: Sendable, Hashable {

/// The type of media.
public let type: String
Expand Down
2 changes: 1 addition & 1 deletion Sources/MultipartFormData/MultipartFormData.swift
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ import Foundation
/// <<png-data>>
/// --example-boundary--
/// ```
public struct MultipartFormData: Hashable {
public struct MultipartFormData: Sendable, Hashable {

/// The boundary to separate the subparts of the ``body`` with.
public let boundary: Boundary
Expand Down
2 changes: 1 addition & 1 deletion Sources/MultipartFormData/Subpart.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Foundation
/// A subpart of the ``MultipartFormData``'s body.
///
/// This can either be initialized the standard way or via the result builder initializer.
public struct Subpart: Hashable {
public struct Subpart: Sendable, Hashable {

/// The content disposition of the subpart.
public var contentDisposition: ContentDisposition
Expand Down