nostrdb-rs

nostrdb in rust!
git clone git://jb55.com/nostrdb-rs
Log | Files | Refs | Submodules | README | LICENSE

commit c083372c36c9ed838dbf3d8742044f97c915ae2b
parent 372144b781b692a3dbae2fe414d606e4099c848e
Author: Ken Sedgwick <ken@bonsai.com>
Date:   Tue, 28 Jan 2025 16:50:11 -0800

drive-by clippy fixes

Diffstat:
Msrc/util/nip10.rs | 14+++-----------
1 file changed, 3 insertions(+), 11 deletions(-)

diff --git 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,