Remove Eq bound of ReservedValue trait

A full Eq implementation is no needed for ReservedValue, as we only need
to check whether a value is the reserved one. For entities (defined with
`entity_impl!`) this doesn't make much difference, but for more
complicated types this avoids generating redundant `Eq`s.
This commit is contained in:
Ömer Sinan Ağacan
2020-05-24 15:07:50 +03:00
committed by Benjamin Bouvier
parent eeb1e141ba
commit c619136752
2 changed files with 18 additions and 4 deletions

View File

@@ -85,6 +85,10 @@ macro_rules! entity_impl {
fn reserved_value() -> $entity {
$entity($crate::__core::u32::MAX)
}
fn is_reserved_value(&self) -> bool {
self.0 == $crate::__core::u32::MAX
}
}
impl $entity {