nostrdb-rs

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

commit 330d00b5146be2e1bd2af45e63ceaada76bff16a
parent 52e1d860cfbb37ef4dc2408af48ead4310501edd
Author: William Casarin <jb55@jb55.com>
Date:   Sat, 27 Apr 2024 00:21:08 -0700

clippy: fix a few warnings

Signed-off-by: William Casarin <jb55@jb55.com>

Diffstat:
Msrc/util/nip10.rs | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/util/nip10.rs b/src/util/nip10.rs @@ -30,7 +30,7 @@ pub struct NoteIdRefBuf { pub marker: Option<Marker>, } -fn tag_to_note_id_ref<'a>(tag: Tag<'a>, marker: Option<Marker>, index: i32) -> NoteIdRef<'a> { +fn tag_to_note_id_ref(tag: Tag<'_>, marker: Option<Marker>, index: i32) -> NoteIdRef<'_> { let id = tag .get_unchecked(1) .variant() @@ -245,7 +245,7 @@ pub fn tag_to_noteid_ref(tag: Tag<'_>, index: u16) -> Result<NoteIdRef<'_>, Erro let relay = tag .get(2) .and_then(|t| t.variant().str()) - .filter(|x| *x != ""); + .filter(|x| !x.is_empty()); let marker = tag .get(3) .and_then(|t| t.variant().str())