mirror of
https://github.com/aljazceru/notedeck.git
synced 2025-12-18 17:14:21 +01:00
add NoteId hashbrown Equivalent impl
Signed-off-by: kernelkind <kernelkind@gmail.com>
This commit is contained in:
@@ -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