impl PartialEq for ChorusUser

This commit is contained in:
bitfl0wer 2023-12-02 20:30:04 +01:00
parent 741b6d6978
commit 5f41f57e77
1 changed files with 10 additions and 0 deletions

View File

@ -131,6 +131,16 @@ pub struct ChorusUser {
pub gateway: GatewayHandle, 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 { impl ChorusUser {
pub fn token(&self) -> String { pub fn token(&self) -> String {
self.token.clone() self.token.clone()