Enabled equatable for tuple

This commit is contained in:
2018-12-07 23:19:00 -06:00
parent 36f95e6f49
commit a57839a58a
+7 -7
View File
@@ -14,10 +14,10 @@ func XCTAssertEqual(test: String, withExpression isTrue: Bool) {
print(test) print(test)
} }
func == <T:Equatable> (tuple1:(T,T),tuple2:(T,T)) -> Bool // func == <T:Equatable> (tuple1:(T,T),tuple2:(T,T)) -> Bool
{ // {
return (tuple1.0 == tuple2.0) && (tuple1.1 == tuple2.1) // return (tuple1.0 == tuple2.0) && (tuple1.1 == tuple2.1)
} // }
struct Tools { struct Tools {
static func readFile(fromPath path: String) -> String { static func readFile(fromPath path: String) -> String {
@@ -57,9 +57,9 @@ extension StringProtocol {
return compactMap { $0.ascii } return compactMap { $0.ascii }
} }
// subscript(offset: Int) -> Element { subscript(offset: Int) -> Element {
// return self[index(startIndex, offsetBy: offset)] return self[index(startIndex, offsetBy: offset)]
// } }
} }
extension String { extension String {