mirror of
https://github.com/aljazceru/notedeck.git
synced 2025-12-18 09:04:21 +01:00
add NoteId hashbrown Equivalent impl
Signed-off-by: kernelkind <kernelkind@gmail.com>
This commit is contained in:
@@ -20,3 +20,4 @@ url = { workspace = true }
|
||||
mio = { workspace = true }
|
||||
tokio = { 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)
|
||||
}
|
||||
}
|
||||
|
||||
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