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:
committed by
Benjamin Bouvier
parent
eeb1e141ba
commit
c619136752
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user