Skip to content

Commit

Permalink
remove double-hasing of typeid for handle (#10699)
Browse files Browse the repository at this point in the history
# Objective

There is a double hash for the typeid for asset handles. (see
[this](#10695 (comment))
for more info)

## Solution

- Remove the second hash of the typeid
  • Loading branch information
DasLixou authored Nov 23, 2023
1 parent 85b6326 commit 960f6e9
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions crates/bevy_asset/src/handle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down Expand Up @@ -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);
}
}

Expand Down

0 comments on commit 960f6e9

Please sign in to comment.