From c083372c36c9ed838dbf3d8742044f97c915ae2b Mon Sep 17 00:00:00 2001 From: Ken Sedgwick Date: Tue, 28 Jan 2025 16:50:11 -0800 Subject: [PATCH] drive-by clippy fixes --- src/util/nip10.rs | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/util/nip10.rs b/src/util/nip10.rs index c6a2d3f..88d7a40 100644 --- a/src/util/nip10.rs +++ b/src/util/nip10.rs @@ -62,21 +62,13 @@ impl NoteReplyBuf { continue; } - if self - .root - .as_ref() - .map_or(false, |x| x.index == index as u16) - { + if self.root.as_ref().is_some_and(|x| x.index == index as u16) { root = Some(tag_to_note_id_ref( tag, self.root.as_ref().unwrap().marker, index, )) - } else if self - .reply - .as_ref() - .map_or(false, |x| x.index == index as u16) - { + } else if self.reply.as_ref().is_some_and(|x| x.index == index as u16) { reply = Some(tag_to_note_id_ref( tag, self.reply.as_ref().unwrap().marker, @@ -85,7 +77,7 @@ impl NoteReplyBuf { } else if self .mention .as_ref() - .map_or(false, |x| x.index == index as u16) + .is_some_and(|x| x.index == index as u16) { mention = Some(tag_to_note_id_ref( tag,