diff --git a/src/atom_table.rs b/src/atom_table.rs index 4a426cd0..ea3a3a78 100644 --- a/src/atom_table.rs +++ b/src/atom_table.rs @@ -56,6 +56,18 @@ impl indexmap::Equivalent for str { } } +impl PartialEq for Atom { + fn eq(&self, other: &str) -> bool { + self.as_str().deref() == other + } +} + +impl PartialEq<&str> for Atom { + fn eq(&self, &other: &&str) -> bool { + self.as_str().deref() == other + } +} + const ATOM_TABLE_INIT_SIZE: usize = 1 << 16; const ATOM_TABLE_ALIGN: usize = 8;