nostrdb-rs

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

commit c95d34cb77815deeadee4cc453b24b948c479569
parent 863e7010acb18da10d7cc3b9bca46408cb8f7e28
Author: William Casarin <jb55@jb55.com>
Date:   Fri, 24 May 2024 12:16:23 -0700

nip10: derive more traits

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

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

diff --git a/src/util/nip10.rs b/src/util/nip10.rs @@ -8,7 +8,7 @@ pub enum Marker { } /// Parsed `e` tags -#[derive(Clone, Copy, Debug)] +#[derive(Clone, Copy, Debug, Eq, PartialEq)] pub struct NoteIdRef<'a> { pub index: u16, pub id: &'a [u8; 32], @@ -25,6 +25,7 @@ impl<'a> NoteIdRef<'a> { } } +#[derive(Clone, Copy, Debug, Eq, PartialEq)] pub struct NoteIdRefBuf { pub index: u16, pub marker: Option<Marker>, @@ -102,7 +103,7 @@ impl NoteReplyBuf { } } -#[derive(Clone, Copy, Debug)] +#[derive(Clone, Copy, Debug, Eq, PartialEq)] pub struct NoteReply<'a> { root: Option<NoteIdRef<'a>>, reply: Option<NoteIdRef<'a>>, @@ -110,6 +111,7 @@ pub struct NoteReply<'a> { } /// Owned version of NoteReply, stores tag indices +#[derive(Clone, Copy, Debug, Eq, PartialEq)] pub struct NoteReplyBuf { pub root: Option<NoteIdRefBuf>, pub reply: Option<NoteIdRefBuf>,