From 039d3374d75ac487afb8a097519a200acee02dc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= Date: Thu, 30 Dec 2021 12:57:37 +0100 Subject: [PATCH] tree-wide: fix needless borrows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit found and fixed via clippy Signed-off-by: Fabian Grünbichler --- pbs-api-types/src/userid.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pbs-api-types/src/userid.rs b/pbs-api-types/src/userid.rs index 60137d2a..7ee64fb0 100644 --- a/pbs-api-types/src/userid.rs +++ b/pbs-api-types/src/userid.rs @@ -556,10 +556,7 @@ impl Authid { } pub fn tokenname(&self) -> Option<&TokennameRef> { - match &self.tokenname { - Some(name) => Some(&name), - None => None, - } + self.tokenname.as_deref() } /// Get the "root@pam" auth id.