From df82e0804189d1fd80649c835fecc339c7331f74 Mon Sep 17 00:00:00 2001 From: kernelkind Date: Wed, 1 Jan 2025 20:01:33 -0500 Subject: [PATCH] remove unused code Signed-off-by: kernelkind --- .../src/ui/profile/preview.rs | 28 ------------------- 1 file changed, 28 deletions(-) diff --git a/crates/notedeck_columns/src/ui/profile/preview.rs b/crates/notedeck_columns/src/ui/profile/preview.rs index 442f2fb3..6124ae27 100644 --- a/crates/notedeck_columns/src/ui/profile/preview.rs +++ b/crates/notedeck_columns/src/ui/profile/preview.rs @@ -194,31 +194,3 @@ pub fn one_line_display_name_widget<'a>( ), } } - -fn get_display_name_as_string<'a>(profile: Option<&ProfileRecord<'a>>) -> &'a str { - let display_name = get_display_name(profile); - match display_name { - DisplayName::One(n) => n, - DisplayName::Both { display_name, .. } => display_name, - } -} - -pub fn get_profile_displayname_string<'a>(txn: &'a Transaction, ndb: &Ndb, pk: &Pubkey) -> &'a str { - let profile = ndb.get_profile_by_pubkey(txn, pk.bytes()).ok(); - get_display_name_as_string(profile.as_ref()) -} - -pub fn get_note_users_displayname_string<'a>( - txn: &'a Transaction, - ndb: &Ndb, - id: &NoteId, -) -> &'a str { - let note = ndb.get_note_by_id(txn, id.bytes()); - let profile = if let Ok(note) = note { - ndb.get_profile_by_pubkey(txn, note.pubkey()).ok() - } else { - None - }; - - get_display_name_as_string(profile.as_ref()) -}