Make PartialEq work with reference lhs

This commit is contained in:
David Tolnay 2020-03-06 10:21:35 -08:00
parent ba5eb2de8c
commit 438e26034c
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82

View File

@ -54,3 +54,15 @@ impl PartialEq<Atom> for Type {
}
}
}
impl PartialEq<Atom> for &Ident {
fn eq(&self, atom: &Atom) -> bool {
*self == atom
}
}
impl PartialEq<Atom> for &Type {
fn eq(&self, atom: &Atom) -> bool {
*self == atom
}
}