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 song: Song
|
||||||
var queuePos: Int
|
var queuePos: Int
|
||||||
var isPlaying: Bool
|
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 {
|
extension Song: Hashable {
|
||||||
func hash(into hasher: inout Hasher) {
|
func hash(into hasher: inout Hasher) {
|
||||||
hasher.combine(mpdSong.uriString)
|
hasher.combine(mpdSong.uriString)
|
||||||
|
hasher.combine(disc)
|
||||||
hasher.combine(trackNumber)
|
hasher.combine(trackNumber)
|
||||||
hasher.combine(title)
|
hasher.combine(title)
|
||||||
hasher.combine(artist)
|
hasher.combine(artist)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user