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:
parent
2ff2e1c96f
commit
1bd6edfb33
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
@ -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)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user