mirror of
https://github.com/aljazceru/notedeck.git
synced 2026-01-16 14:54:20 +01:00
debug: implemented fmt::Debug for NoteId
This commit is contained in:
committed by
William Casarin
parent
f00b301e88
commit
35e8e536e6
@@ -1,11 +1,18 @@
|
||||
use crate::{Error, Pubkey};
|
||||
|
||||
use serde::{Deserialize, Deserializer, Serialize, Serializer};
|
||||
use std::fmt;
|
||||
use std::hash::{Hash, Hasher};
|
||||
|
||||
#[derive(Debug, Clone, Copy, Eq, PartialEq, Hash)]
|
||||
#[derive(Clone, Copy, Eq, PartialEq, Hash)]
|
||||
pub struct NoteId([u8; 32]);
|
||||
|
||||
impl fmt::Debug for NoteId {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
write!(f, "{}", self.hex())
|
||||
}
|
||||
}
|
||||
|
||||
static HRP_NOTE: nostr::bech32::Hrp = nostr::bech32::Hrp::parse_unchecked("note");
|
||||
|
||||
impl NoteId {
|
||||
|
||||
Reference in New Issue
Block a user