From b96f1c301417298870239531a8caffd351f1f0b4 Mon Sep 17 00:00:00 2001 From: Joe Ardent Date: Sun, 14 Apr 2024 12:05:39 -0700 Subject: [PATCH] silence clippy lint. --- src/user.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/user.rs b/src/user.rs index f45629d..440dcd8 100644 --- a/src/user.rs +++ b/src/user.rs @@ -34,11 +34,7 @@ impl Debug for User { impl Display for User { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { let uname = &self.username; - let dname = if let Some(ref n) = self.displayname { - n - } else { - "" - }; + let dname = self.displayname.as_deref().unwrap_or_default(); let email = &self.email; write!( f,