diff --git a/src/api2/types/userid.rs b/src/api2/types/userid.rs index f0a61031..44cd10b7 100644 --- a/src/api2/types/userid.rs +++ b/src/api2/types/userid.rs @@ -131,13 +131,13 @@ impl std::ops::Deref for Username { impl Borrow for Username { fn borrow(&self) -> &UsernameRef { - UsernameRef::new(self.as_str()) + UsernameRef::new(self.0.as_str()) } } impl AsRef for Username { fn as_ref(&self) -> &UsernameRef { - UsernameRef::new(self.as_str()) + self.borrow() } } @@ -204,13 +204,13 @@ impl std::ops::Deref for Realm { impl Borrow for Realm { fn borrow(&self) -> &RealmRef { - RealmRef::new(self.as_str()) + RealmRef::new(self.0.as_str()) } } impl AsRef for Realm { fn as_ref(&self) -> &RealmRef { - RealmRef::new(self.as_str()) + self.borrow() } }