From e4a864bd214cafc71c34763d2afaab28b14614d5 Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Fri, 30 Oct 2020 09:13:05 +0100 Subject: [PATCH] impl From for Userid Signed-off-by: Wolfgang Bumiller --- src/api2/types/userid.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/api2/types/userid.rs b/src/api2/types/userid.rs index 2b5b43af..9104de22 100644 --- a/src/api2/types/userid.rs +++ b/src/api2/types/userid.rs @@ -474,6 +474,12 @@ impl PartialEq for Userid { } } +impl From for Userid { + fn from(authid: Authid) -> Self { + authid.user + } +} + impl From<(Username, Realm)> for Userid { fn from(parts: (Username, Realm)) -> Self { Self::from((parts.0.as_ref(), parts.1.as_ref()))