Skip to content

Commit 1f7f7a5

Browse files
committed
pushed always failed tests
1 parent f10321d commit 1f7f7a5

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

Sources/WebLinking.swift

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ public struct Link: Equatable, Hashable {
1414
self.parameters = parameters ?? [:]
1515
}
1616

17-
/// Returns the hash value
18-
public var hashValue: Int {
19-
return uri.hashValue
20-
}
17+
// /// Returns the hash value
18+
// public var hashValue: Int {
19+
// return uri.hashValue
20+
// }
2121

2222
/// Relation type of the Link.
2323
public var relationType: String? {
@@ -35,10 +35,10 @@ public struct Link: Equatable, Hashable {
3535
}
3636
}
3737

38-
/// Returns whether two Link's are equivalent
39-
public func == (lhs: Link, rhs: Link) -> Bool {
40-
return lhs.uri == rhs.uri && lhs.parameters == rhs.parameters
41-
}
38+
///// Returns whether two Link's are equivalent
39+
//public func == (lhs: Link, rhs: Link) -> Bool {
40+
// return lhs.uri == rhs.uri && lhs.parameters == rhs.parameters
41+
//}
4242

4343
// MARK: HTML Element Conversion
4444

@@ -49,7 +49,7 @@ extension Link {
4949
let components = parameters.map { key, value in
5050
"\(key)=\"\(value)\""
5151
} + ["href=\"\(uri)\""]
52-
let elements = components.joined(separator: " ")
52+
let elements = components.sorted().joined(separator: " ")
5353
return "<link \(elements) />"
5454
}
5555
}
@@ -63,7 +63,7 @@ extension Link {
6363
let components = ["<\(uri)>"] + parameters.map { key, value in
6464
"\(key)=\"\(value)\""
6565
}
66-
return components.joined(separator: "; ")
66+
return components.sorted().joined(separator: "; ")
6767
}
6868

6969
/*** Initialize a Link with a HTTP Link header

0 commit comments

Comments
 (0)