remove double-hasing of typeid for handle (#10699)

# Objective

There is a double hash for the typeid for asset handles. (see
[this](https://github.com/bevyengine/bevy/issues/10695#issuecomment-1822340727)
for more info)

## Solution

- Remove the second hash of the typeid
This commit is contained in:
Lixou 2023-11-23 02:04:37 +01:00 committed by GitHub
parent 85b6326970
commit 960f6e9131
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -223,7 +223,6 @@ impl<A: Asset> Hash for Handle<A> {
#[inline]
fn hash<H: Hasher>(&self, state: &mut H) {
self.id().hash(state);
TypeId::of::<A>().hash(state);
}
}
@ -393,7 +392,6 @@ impl Hash for UntypedHandle {
#[inline]
fn hash<H: Hasher>(&self, state: &mut H) {
self.id().hash(state);
self.type_id().hash(state);
}
}