Skip to content

Replace NIOSendable with Sendable #640

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

Merged
merged 1 commit into from
Oct 12, 2022
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
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import NIOCore

/// - Note: use `HTTPClientRequest.Body.Length` if you want to expose `RequestBodyLength` publicly
@usableFromInline
internal enum RequestBodyLength: Hashable, NIOSendable {
internal enum RequestBodyLength: Hashable, Sendable {
/// size of the request body is not known before starting the request
case unknown
/// size of the request body is fixed and exactly `count` bytes
Expand Down
2 changes: 1 addition & 1 deletion Sources/AsyncHTTPClient/HTTPClient+HTTPCookie.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import NIOCore

extension HTTPClient {
/// A representation of an HTTP cookie.
public struct Cookie: NIOSendable {
public struct Cookie: Sendable {
/// The name of the cookie.
public var name: String
/// The cookie's string value.
Expand Down
2 changes: 1 addition & 1 deletion Sources/AsyncHTTPClient/HTTPClient+Proxy.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ extension HTTPClient.Configuration {
/// If a `TLSConfiguration` is used in conjunction with `HTTPClient.Configuration.Proxy`,
/// TLS will be established _after_ successful proxy, between your client
/// and the destination server.
public struct Proxy: NIOSendable, Hashable {
public struct Proxy: Sendable, Hashable {
enum ProxyType: Hashable {
case http(HTTPClient.Authorization?)
case socks
Expand Down
10 changes: 5 additions & 5 deletions Sources/AsyncHTTPClient/HTTPClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -875,7 +875,7 @@ public class HTTPClient {
}

/// Specifies decompression settings.
public enum Decompression: NIOSendable {
public enum Decompression: Sendable {
/// Decompression is disabled.
case disabled
/// Decompression is enabled.
Expand Down Expand Up @@ -911,7 +911,7 @@ extension HTTPClient: @unchecked Sendable {}

extension HTTPClient.Configuration {
/// Timeout configuration.
public struct Timeout: NIOSendable {
public struct Timeout: Sendable {
/// Specifies connect timeout. If no connect timeout is given, a default 30 seconds timeout will applied.
public var connect: TimeAmount?
/// Specifies read timeout.
Expand All @@ -934,7 +934,7 @@ extension HTTPClient.Configuration {
}

/// Specifies redirect processing settings.
public struct RedirectConfiguration: NIOSendable {
public struct RedirectConfiguration: Sendable {
enum Mode {
/// Redirects are not followed.
case disallow
Expand Down Expand Up @@ -966,7 +966,7 @@ extension HTTPClient.Configuration {
}

/// Connection pool configuration.
public struct ConnectionPool: Hashable, NIOSendable {
public struct ConnectionPool: Hashable, Sendable {
/// Specifies amount of time connections are kept idle in the pool. After this time has passed without a new
/// request the connections are closed.
public var idleTimeout: TimeAmount
Expand Down Expand Up @@ -995,7 +995,7 @@ extension HTTPClient.Configuration {
}
}

public struct HTTPVersion: NIOSendable, Hashable {
public struct HTTPVersion: Sendable, Hashable {
internal enum Configuration {
case http1Only
case automatic
Expand Down
2 changes: 1 addition & 1 deletion Sources/AsyncHTTPClient/HTTPHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ extension HTTPClient {
}

/// HTTP authentication.
public struct Authorization: Hashable, NIOSendable {
public struct Authorization: Hashable, Sendable {
private enum Scheme: Hashable {
case Basic(String)
case Bearer(String)
Expand Down