From 1bd6edfb3379358bb7146196f0ba4da49cf24f87 Mon Sep 17 00:00:00 2001 From: Daniel Barber Date: Mon, 17 Jun 2019 19:29:17 -0400 Subject: [PATCH] Turns out Swift can synthesize this! --- Persephone/Models/QueueItem.swift | 6 ------ Persephone/Models/Song.swift | 1 + 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/Persephone/Models/QueueItem.swift b/Persephone/Models/QueueItem.swift index 8a98214..e85d091 100644 --- a/Persephone/Models/QueueItem.swift +++ b/Persephone/Models/QueueItem.swift @@ -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) - } } diff --git a/Persephone/Models/Song.swift b/Persephone/Models/Song.swift index 0d283fe..a69f38f 100644 --- a/Persephone/Models/Song.swift +++ b/Persephone/Models/Song.swift @@ -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)