From 5f41f57e77379e75cf8d9e69c9c54e925ad83b6e Mon Sep 17 00:00:00 2001 From: bitfl0wer Date: Sat, 2 Dec 2023 20:30:04 +0100 Subject: [PATCH] impl PartialEq for ChorusUser --- src/instance.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/instance.rs b/src/instance.rs index 8e160b8..fc0bcda 100644 --- a/src/instance.rs +++ b/src/instance.rs @@ -131,6 +131,16 @@ pub struct ChorusUser { pub gateway: GatewayHandle, } +impl PartialEq for ChorusUser { + fn eq(&self, other: &Self) -> bool { + self.token == other.token + && self.limits == other.limits + && self.gateway.url == other.gateway.url + } +} + +impl Eq for ChorusUser {} + impl ChorusUser { pub fn token(&self) -> String { self.token.clone()