Skip to content

Commit c452b80

Browse files
committed
Refactor ObjectType's Equatable implementation to be a static method
1 parent e41b2f9 commit c452b80

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

SwiftGit2/Objects.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ public protocol ObjectType {
2121
init(_ pointer: OpaquePointer)
2222
}
2323

24-
public func == <O: ObjectType>(lhs: O, rhs: O) -> Bool {
25-
return lhs.oid == rhs.oid
26-
}
27-
2824
public extension ObjectType {
25+
static func == (lhs: Self, rhs: Self) -> Bool {
26+
return lhs.oid == rhs.oid
27+
}
28+
2929
func hash(into hasher: inout Hasher) {
3030
hasher.combine(oid)
3131
}

0 commit comments

Comments
 (0)