add NoteId hashbrown Equivalent impl

Signed-off-by: kernelkind <kernelkind@gmail.com>
This commit is contained in:
kernelkind
2025-06-16 17:16:02 -04:00
parent cc5a888b89
commit 6da10c4faf
3 changed files with 8 additions and 0 deletions

View File

@@ -20,3 +20,4 @@ url = { workspace = true }
mio = { workspace = true }
tokio = { workspace = true }
tokenator = { workspace = true }
hashbrown = { workspace = true }

View File

@@ -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()
}
}