Skip to content

Commit

Permalink
Implement From<&mut Handle<A>> for AssetId<A>
Browse files Browse the repository at this point in the history
  • Loading branch information
doonv committed Nov 4, 2023
1 parent bf30a25 commit f8f8d38
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions crates/bevy_asset/src/id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,13 @@ impl<A: Asset> From<&Handle<A>> for AssetId<A> {
}
}

impl<A: Asset> From<&mut Handle<A>> for AssetId<A> {
#[inline]
fn from(value: &mut Handle<A>) -> Self {
value.id()
}
}

impl<A: Asset> From<UntypedHandle> for AssetId<A> {
#[inline]
fn from(value: UntypedHandle) -> Self {
Expand Down

0 comments on commit f8f8d38

Please sign in to comment.