Skip to content

Commit d62e3cf

Browse files
committed
linting
1 parent a3d13fb commit d62e3cf

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

Sources/OpenAPIURLSession/URLSessionTransport.swift

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ public struct URLSessionTransport: ClientTransport {
7070
/// - Parameter session: The URLSession used for performing HTTP operations.
7171
/// If none is provided, the system uses the shared URLSession.
7272
public init(session: URLSession = .shared) { self.init(session: session, implementation: .platformDefault) }
73-
7473
/// Specifies the mode in which HTTP request and response bodies are processed.
7574
public enum HTTPBodyProcessingMode {
7675
/// Processes the HTTP body incrementally as bytes become available.
@@ -85,15 +84,15 @@ public struct URLSessionTransport: ClientTransport {
8584
/// Use this mode when it's necessary or simpler to handle complete data payloads at once.
8685
case buffered
8786
}
88-
87+
/// Creates a new configuration with the provided session.
88+
/// - Parameters:
89+
/// - session: The URLSession used for performing HTTP operations.
90+
/// - httpBodyProcessingMode: The mode used to process HTTP request and response bodies.
8991
public init(session: URLSession = .shared, httpBodyProcessingMode: HTTPBodyProcessingMode) {
9092
self.session = session
9193
switch httpBodyProcessingMode {
92-
93-
case .streamed:
94-
self.implementation = .defaultStreaming
95-
case .buffered:
96-
self.implementation = .buffering
94+
case .streamed: self.implementation = .defaultStreaming
95+
case .buffered: self.implementation = .buffering
9796
}
9897
}
9998

@@ -382,7 +381,6 @@ extension URLSessionTransport.Configuration.Implementation {
382381
guard platformSupportsStreaming else { return .buffering }
383382
return .defaultStreaming
384383
}
385-
386384
static var defaultStreaming: Self {
387385
.streaming(
388386
requestBodyStreamBufferSize: 16 * 1024,

0 commit comments

Comments
 (0)