Skip to content

Commit

Permalink
Merge pull request #10 from beefon/master
Browse files Browse the repository at this point in the history
Fix Swift 5.0 warning, update swift tools to version 4.2
  • Loading branch information
mickmaccallum authored Apr 5, 2019
2 parents e4232c3 + 96c8517 commit 5bdaf31
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:4.0
// swift-tools-version:4.2
import PackageDescription

let package = Package(
Expand Down
12 changes: 2 additions & 10 deletions Sources/CountedSet/CountedSet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -237,16 +237,8 @@ extension CountedSet: CustomStringConvertible, CustomDebugStringConvertible {
}

extension CountedSet : Hashable {
public var hashValue: Int {
var hash = 5381

for (element, count) in backingDictionary {
for _ in 1...count {
hash = ((hash << 5) &+ hash) &+ element.hashValue
}
}

return hash
public func hash(into hasher: inout Hasher) {
hasher.combine(backingDictionary)
}
}

Expand Down

0 comments on commit 5bdaf31

Please sign in to comment.