Skip to content
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 @@ -28,7 +28,7 @@ extension Data {
extension Request {
/// Allows modifying the parsed query parameters of the request.
mutating func mutateQuery(_ closure: (inout URLComponents) throws -> Void) rethrows {
var urlComponents: URLComponents = .init()
var urlComponents = URLComponents()
if let query {
urlComponents.percentEncodedQuery = query
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/OpenAPIRuntime/Deprecated/Deprecated.swift
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ extension Request {
/// Allows modifying the parsed query parameters of the request.
@available(*, deprecated)
mutating func mutatingQuery(_ closure: (inout URLComponents) throws -> Void) rethrows {
var urlComponents: URLComponents = .init()
var urlComponents = URLComponents()
if let query {
urlComponents.percentEncodedQuery = query
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ final class Test_CodableExtensions: Test_Runtime {
}

var testEncoder: JSONEncoder {
let encoder: JSONEncoder = .init()
let encoder = JSONEncoder()
encoder.outputFormatting = [.prettyPrinted, .sortedKeys]
return encoder
}
Expand Down Expand Up @@ -187,7 +187,7 @@ final class Test_CodableExtensions: Test_Runtime {

struct Foo: Encodable {
var bar: String
var additionalProperties: OpenAPIObjectContainer = .init()
var additionalProperties = OpenAPIObjectContainer()

enum CodingKeys: String, CodingKey {
case bar
Expand Down
2 changes: 1 addition & 1 deletion Tests/OpenAPIRuntimeTests/Test_Runtime.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class Test_Runtime: XCTestCase {
}

var testComponents: URLComponents {
var components: URLComponents = .init()
var components = URLComponents()
components.path = "/api"
return components
}
Expand Down