mirror of
https://github.com/damus-io/notedeck.git
synced 2024-10-18 11:13:23 +00:00
debug: implemented fmt::Debug for NoteId
This commit is contained in:
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 {
|
||||
|
Loading…
Reference in New Issue
Block a user