Skip to content

Commit 72cc74f

Browse files
committed
Add Equatable conformance
1 parent 01c0990 commit 72cc74f

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
//
2+
// SwiftTraderWebSocketError+Equatable.swift
3+
//
4+
//
5+
// Created by Fernando Fernandes on 03.01.24.
6+
//
7+
8+
import Foundation
9+
10+
extension SwiftTraderWebSocketError: Equatable {
11+
public static func == (lhs: SwiftTraderWebSocketError,
12+
rhs: SwiftTraderWebSocketError) -> Bool {
13+
switch (lhs, rhs) {
14+
case (.invalidWebSocketURL(let rhsURLString),
15+
.invalidWebSocketURL(let lhsURLString)):
16+
return rhsURLString == lhsURLString
17+
}
18+
}
19+
}

0 commit comments

Comments
 (0)