mirror of
https://github.com/aljazceru/notedeck.git
synced 2025-12-19 01:24:21 +01:00
add NoteId hashbrown Equivalent impl
Signed-off-by: kernelkind <kernelkind@gmail.com>
This commit is contained in:
1
Cargo.lock
generated
1
Cargo.lock
generated
@@ -1554,6 +1554,7 @@ version = "0.3.0"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"bech32",
|
"bech32",
|
||||||
"ewebsock",
|
"ewebsock",
|
||||||
|
"hashbrown",
|
||||||
"hex",
|
"hex",
|
||||||
"mio",
|
"mio",
|
||||||
"nostr 0.37.0",
|
"nostr 0.37.0",
|
||||||
|
|||||||
@@ -20,3 +20,4 @@ url = { workspace = true }
|
|||||||
mio = { workspace = true }
|
mio = { workspace = true }
|
||||||
tokio = { workspace = true }
|
tokio = { workspace = true }
|
||||||
tokenator = { workspace = true }
|
tokenator = { workspace = true }
|
||||||
|
hashbrown = { workspace = true }
|
||||||
@@ -143,3 +143,9 @@ impl<'de> Deserialize<'de> for NoteId {
|
|||||||
NoteId::from_hex(&s).map_err(serde::de::Error::custom)
|
NoteId::from_hex(&s).map_err(serde::de::Error::custom)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl hashbrown::Equivalent<NoteId> for &[u8; 32] {
|
||||||
|
fn equivalent(&self, key: &NoteId) -> bool {
|
||||||
|
self.as_slice() == key.bytes()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user