Skip to content

Commit 3b30918

Browse files
committed
review fix: spelling
1 parent 082cfeb commit 3b30918

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

Sources/AsyncHTTPClient/HTTPClient.swift

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -176,11 +176,11 @@ public class HTTPClient {
176176
///
177177
/// - parameters:
178178
/// - request: HTTP request to execute.
179-
/// - eventLoop: NIO Event Loop preferrence.
179+
/// - eventLoop: NIO Event Loop preference.
180180
/// - deadline: Point in time by which the request must complete.
181-
public func execute(request: Request, eventLoopPreferrence: EventLoop, deadline: NIODeadline? = nil) -> EventLoopFuture<Response> {
181+
public func execute(request: Request, eventLoop: EventLoopPreference, deadline: NIODeadline? = nil) -> EventLoopFuture<Response> {
182182
let accumulator = ResponseAccumulator(request: request)
183-
return self.execute(request: request, delegate: accumulator, eventLoop: eventLoopPreferrence, deadline: deadline).futureResult
183+
return self.execute(request: request, delegate: accumulator, eventLoop: eventLoop, deadline: deadline).futureResult
184184
}
185185

186186
/// Execute arbitrary HTTP request and handle response processing using provided delegate.
@@ -199,10 +199,10 @@ public class HTTPClient {
199199
/// - parameters:
200200
/// - request: HTTP request to execute.
201201
/// - delegate: Delegate to process response parts.
202-
/// - eventLoop: NIO Event Loop preferrence.
202+
/// - eventLoop: NIO Event Loop preference.
203203
/// - deadline: Point in time by which the request must complete.
204-
public func execute<T: HTTPClientResponseDelegate>(request: Request, delegate: T, eventLoop: EventLoopPreferrence, deadline: NIODeadline? = nil) -> Task<T.Response> {
205-
switch eventLoop.preferrence {
204+
public func execute<T: HTTPClientResponseDelegate>(request: Request, delegate: T, eventLoop: EventLoopPreference, deadline: NIODeadline? = nil) -> Task<T.Response> {
205+
switch eventLoop.preference {
206206
case .indifferent:
207207
return self.execute(request: request, delegate: delegate, eventLoop: self.eventLoopGroup.next(), deadline: deadline)
208208
case .prefers(let preferred):
@@ -343,20 +343,20 @@ public class HTTPClient {
343343
}
344344

345345
/// Specifies how the library will treat event loop passed by the user.
346-
public struct EventLoopPreferrence {
347-
enum Preferrence {
346+
public struct EventLoopPreference {
347+
enum Preference {
348348
/// Event Loop will be selected by the library.
349349
case indifferent
350350
/// Library will try to use provided event loop if possible.
351351
case prefers(EventLoop)
352352
}
353353

354-
var preferrence: Preferrence
354+
var preference: Preference
355355

356356
/// Event Loop will be selected by the library.
357-
public static let indifferent = EventLoopPreferrence(preferrence: .indifferent)
357+
public static let indifferent = EventLoopPreference(preference: .indifferent)
358358
/// Library will try to use provided event loop if possible.
359-
public static func prefers(_ eventLoop: EventLoop) -> EventLoopPreferrence { EventLoopPreferrence(preferrence: .prefers(eventLoop)) }
359+
public static func prefers(_ eventLoop: EventLoop) -> EventLoopPreference { EventLoopPreference(preference: .prefers(eventLoop)) }
360360
}
361361

362362
/// Timeout configuration

0 commit comments

Comments
 (0)