From aa0c1012db92d0dd57e551a0a2edf03281d54f2b Mon Sep 17 00:00:00 2001 From: William Casarin Date: Wed, 16 Apr 2025 22:20:00 -0700 Subject: [PATCH] misc: driveby fixes Signed-off-by: William Casarin --- crates/notedeck_columns/src/ui/note/post.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/crates/notedeck_columns/src/ui/note/post.rs b/crates/notedeck_columns/src/ui/note/post.rs index c30b6bfa..da15b7be 100644 --- a/crates/notedeck_columns/src/ui/note/post.rs +++ b/crates/notedeck_columns/src/ui/note/post.rs @@ -201,9 +201,7 @@ impl<'a, 'd> PostView<'a, 'd> { cursor_index: usize, textedit_output: &TextEditOutput, ) { - let mention = if let Some(mention) = self.draft.buffer.get_mention(cursor_index) { - mention - } else { + let Some(mention) = self.draft.buffer.get_mention(cursor_index) else { return; }; @@ -247,9 +245,7 @@ impl<'a, 'd> PostView<'a, 'd> { hint_rect }; - let res = if let Ok(res) = self.note_context.ndb.search_profile(txn, mention_str, 10) { - res - } else { + let Ok(res) = self.note_context.ndb.search_profile(txn, mention_str, 10) else { return; };