From 16ff6ba70337639285615338332ab830d81b4ff8 Mon Sep 17 00:00:00 2001 From: Abhash Kumar Singh Date: Tue, 11 Feb 2025 11:08:02 -0800 Subject: [PATCH] fix: add hashable conformance to authenticator states --- Sources/Authenticator/States/AuthenticatorBaseState.swift | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Sources/Authenticator/States/AuthenticatorBaseState.swift b/Sources/Authenticator/States/AuthenticatorBaseState.swift index 91996fe..bece301 100644 --- a/Sources/Authenticator/States/AuthenticatorBaseState.swift +++ b/Sources/Authenticator/States/AuthenticatorBaseState.swift @@ -250,10 +250,14 @@ public class AuthenticatorBaseState: ObservableObject { } } -extension AuthenticatorBaseState: Equatable { +extension AuthenticatorBaseState: Equatable, Hashable { public static func == (lhs: AuthenticatorBaseState, rhs: AuthenticatorBaseState) -> Bool { lhs === rhs } + + public func hash(into hasher: inout Hasher){ + hasher.combine(ObjectIdentifier(self)) + } } extension AuthenticatorBaseState: AuthenticatorLogging {}