From 330d00b5146be2e1bd2af45e63ceaada76bff16a Mon Sep 17 00:00:00 2001 From: William Casarin Date: Sat, 27 Apr 2024 00:21:08 -0700 Subject: [PATCH] clippy: fix a few warnings Signed-off-by: William Casarin --- src/util/nip10.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/nip10.rs b/src/util/nip10.rs index 8019e67..33578a2 100644 --- a/src/util/nip10.rs +++ b/src/util/nip10.rs @@ -30,7 +30,7 @@ pub struct NoteIdRefBuf { pub marker: Option, } -fn tag_to_note_id_ref<'a>(tag: Tag<'a>, marker: Option, index: i32) -> NoteIdRef<'a> { +fn tag_to_note_id_ref(tag: Tag<'_>, marker: Option, 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, 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())