File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed
Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -468,12 +468,6 @@ private struct MovePath: Hashable {
468468 let source : Int
469469 let destination : Int
470470
471- func hash( into hasher: inout Hasher ) {
472- let sum = source + destination
473- let hash = ( sum * ( sum + 1 ) ) >> 1 + destination
474- hasher. combine ( hash)
475- }
476-
477471 func shifted( by offset: Int ) -> MovePath {
478472 return MovePath ( source: source + offset, destination: destination + offset)
479473 }
@@ -499,9 +493,8 @@ extension Set where Element == Int {
499493
500494extension Changeset . Move : Hashable {
501495 public func hash( into hasher: inout Hasher ) {
502- let sum = source + destination
503- let hash = ( sum * ( sum + 1 ) ) >> 1 + destination
504- hasher. combine ( hash)
496+ hasher. combine ( source)
497+ hasher. combine ( destination)
505498 }
506499
507500 public static func == ( left: Changeset . Move , right: Changeset . Move ) -> Bool {
You can’t perform that action at this time.
0 commit comments