Skip to content

Commit

Permalink
drive-by clippy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ksedgwic committed Jan 29, 2025
1 parent 372144b commit c083372
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions src/util/nip10.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit c083372

Please sign in to comment.