diff --git a/src/api2/types/userid.rs b/src/api2/types/userid.rs index 31a6a4a4..bdf383de 100644 --- a/src/api2/types/userid.rs +++ b/src/api2/types/userid.rs @@ -268,6 +268,24 @@ impl PartialEq<&str> for RealmRef { } } +impl PartialEq for Realm { + fn eq(&self, rhs: &RealmRef) -> bool { + self.0 == &rhs.0 + } +} + +impl PartialEq for RealmRef { + fn eq(&self, rhs: &Realm) -> bool { + self.0 == rhs.0 + } +} + +impl PartialEq for &RealmRef { + fn eq(&self, rhs: &Realm) -> bool { + (*self).0 == rhs.0 + } +} + /// A complete user id consting of a user name and a realm. #[derive(Clone, Debug, Hash)] pub struct Userid {