1
1
mirror of https://github.com/danbee/persephone synced 2025-03-04 08:39:11 +00:00

Turns out Swift can synthesize this!

This commit is contained in:
Daniel Barber 2019-06-17 19:29:17 -04:00
parent 2ff2e1c96f
commit 1bd6edfb33
Signed by: danbarber
GPG Key ID: 931D8112E0103DD8
2 changed files with 1 additions and 6 deletions

View File

@ -12,10 +12,4 @@ struct QueueItem: Hashable {
var song: Song
var queuePos: Int
var isPlaying: Bool
func hash(into hasher: inout Hasher) {
hasher.combine(song)
hasher.combine(queuePos)
hasher.combine(isPlaying)
}
}

View File

@ -47,6 +47,7 @@ extension Song: Equatable {
extension Song: Hashable {
func hash(into hasher: inout Hasher) {
hasher.combine(mpdSong.uriString)
hasher.combine(disc)
hasher.combine(trackNumber)
hasher.combine(title)
hasher.combine(artist)