From c188c6c5909bad8cdf8e78355dd89b69d48c9e33 Mon Sep 17 00:00:00 2001 From: Paul Pela Date: Fri, 16 Oct 2020 23:35:09 +0200 Subject: [PATCH] Removed an unnecessary guard check, as per https://stackoverflow.com/a/64396141/5820627 --- Sources/DiceKit/DieSide.swift | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Sources/DiceKit/DieSide.swift b/Sources/DiceKit/DieSide.swift index c8f29515..81fa54e3 100644 --- a/Sources/DiceKit/DieSide.swift +++ b/Sources/DiceKit/DieSide.swift @@ -14,10 +14,7 @@ public struct DieSide: Hashable {//If not Hashable, ensure /// The value that this DieSide will return when rolled. public let value: OutputType - public static func == (lhs: DieSide, rhs: DieSide) -> Bool { //IMPORTANT NOTE: THIS DOES NOT ACCEPT `DieSide`s WITH DIFFERENT GENERIC ARGUMENTS - guard type(of: lhs.value) == type(of: rhs.value) else { - return false - } + public static func == (lhs: DieSide, rhs: DieSide) -> Bool { return lhs.value == rhs.value }