Skip to content

Commit

Permalink
remove double-hasing of typeid for handle (bevyengine#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](bevyengine#10695 (comment))
for more info)

## Solution

- Remove the second hash of the typeid
  • Loading branch information
DasLixou authored and Ray Redondo committed Jan 9, 2024
1 parent 0cff5bd commit 2ea13e7
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 2ea13e7

Please sign in to comment.