Skip to content

Commit 4312caf

Browse files
authored
Remove redundant explicit Equatable conformances (#42)
1 parent ad847cb commit 4312caf

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

Sources/OpenAPIRuntime/Base/CommonOutputPayloads.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
/// not all are defined by the user in the OpenAPI document, an extra
2020
/// `undocumented` enum case is used when such a status code is
2121
/// detected.
22-
public struct UndocumentedPayload: Sendable, Equatable, Hashable {
22+
public struct UndocumentedPayload: Sendable, Hashable {
2323
/// Creates a new payload.
2424
public init() {}
2525
}

Sources/OpenAPIRuntime/Base/OpenAPIValue.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
///
3434
/// - Important: This type is expensive at runtime; try to avoid it.
3535
/// Define the structure of your types in the OpenAPI document instead.
36-
public struct OpenAPIValueContainer: Codable, Equatable, Hashable, Sendable {
36+
public struct OpenAPIValueContainer: Codable, Hashable, Sendable {
3737

3838
/// The underlying dynamic value.
3939
public var value: (any Sendable)?
@@ -278,7 +278,7 @@ extension OpenAPIValueContainer: ExpressibleByFloatLiteral {
278278
///
279279
/// - Important: This type is expensive at runtime; try to avoid it.
280280
/// Define the structure of your types in the OpenAPI document instead.
281-
public struct OpenAPIObjectContainer: Codable, Equatable, Hashable, Sendable {
281+
public struct OpenAPIObjectContainer: Codable, Hashable, Sendable {
282282

283283
/// The underlying dynamic dictionary value.
284284
public var value: [String: (any Sendable)?]
@@ -382,7 +382,7 @@ public struct OpenAPIObjectContainer: Codable, Equatable, Hashable, Sendable {
382382
///
383383
/// - Important: This type is expensive at runtime; try to avoid it.
384384
/// Define the structure of your types in the OpenAPI document instead.
385-
public struct OpenAPIArrayContainer: Codable, Equatable, Hashable, Sendable {
385+
public struct OpenAPIArrayContainer: Codable, Hashable, Sendable {
386386

387387
/// The underlying dynamic array value.
388388
public var value: [(any Sendable)?]

Sources/OpenAPIRuntime/Conversion/CodableExtensions.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ extension Encoder {
149149
}
150150

151151
/// A freeform String coding key for decoding undocumented values.
152-
private struct StringKey: CodingKey, Equatable, Hashable, Comparable {
152+
private struct StringKey: CodingKey, Hashable, Comparable {
153153

154154
var stringValue: String
155155
var intValue: Int? {

Sources/OpenAPIRuntime/Interface/CurrencyTypes.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import Foundation
1919
#endif
2020

2121
/// A header field used in an HTTP request or response.
22-
public struct HeaderField: Equatable, Hashable, Sendable {
22+
public struct HeaderField: Hashable, Sendable {
2323

2424
/// The name of the HTTP header field.
2525
public var name: String
@@ -40,10 +40,10 @@ public struct HeaderField: Equatable, Hashable, Sendable {
4040
/// Describes the HTTP method used in an OpenAPI operation.
4141
///
4242
/// https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#fixed-fields-7
43-
public struct HTTPMethod: RawRepresentable, Equatable, Hashable, Sendable {
43+
public struct HTTPMethod: RawRepresentable, Hashable, Sendable {
4444

4545
/// Describes an HTTP method explicitly supported by OpenAPI.
46-
private enum OpenAPIHTTPMethod: String, Equatable, Hashable, Sendable {
46+
private enum OpenAPIHTTPMethod: String, Hashable, Sendable {
4747
case GET
4848
case PUT
4949
case POST
@@ -120,7 +120,7 @@ public struct HTTPMethod: RawRepresentable, Equatable, Hashable, Sendable {
120120
}
121121

122122
/// An HTTP request, sent by the client to the server.
123-
public struct Request: Equatable, Hashable, Sendable {
123+
public struct Request: Hashable, Sendable {
124124

125125
/// The path of the URL for the HTTP request.
126126
public var path: String
@@ -199,7 +199,7 @@ public struct Request: Equatable, Hashable, Sendable {
199199
}
200200

201201
/// An HTTP response, returned by the server to the client.
202-
public struct Response: Equatable, Hashable, Sendable {
202+
public struct Response: Hashable, Sendable {
203203

204204
/// The status code of the HTTP response, for example `200`.
205205
public var statusCode: Int
@@ -228,7 +228,7 @@ public struct Response: Equatable, Hashable, Sendable {
228228

229229
/// A container for request metadata already parsed and validated
230230
/// by the server transport.
231-
public struct ServerRequestMetadata: Equatable, Hashable, Sendable {
231+
public struct ServerRequestMetadata: Hashable, Sendable {
232232

233233
/// The path parameters parsed from the URL of the HTTP request.
234234
public var pathParameters: [String: String]
@@ -252,7 +252,7 @@ public struct ServerRequestMetadata: Equatable, Hashable, Sendable {
252252
}
253253

254254
/// Describes the kind and associated data of a URL path component.
255-
public enum RouterPathComponent: Equatable, Hashable, Sendable {
255+
public enum RouterPathComponent: Hashable, Sendable {
256256

257257
/// A constant string component.
258258
///

0 commit comments

Comments
 (0)