Skip to content

Commit

Permalink
asset: make HandleUntyped<T>::id private
Browse files Browse the repository at this point in the history
  • Loading branch information
neocturne committed Jan 2, 2023
1 parent b027d40 commit 40c38fd
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions crates/bevy_asset/src/handle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -322,8 +322,7 @@ impl<T: Asset> Clone for Handle<T> {
/// To convert back to a typed handle, use the [typed](HandleUntyped::typed) method.
#[derive(Debug)]
pub struct HandleUntyped {
/// An unique identifier to an Asset.
pub id: HandleId,
id: HandleId,
handle_type: HandleType,
}

Expand Down Expand Up @@ -352,6 +351,12 @@ impl HandleUntyped {
}
}

/// The ID of the asset.
#[inline]
pub fn id(&self) -> HandleId {
self.id
}

/// Creates a weak copy of this handle.
#[must_use]
pub fn clone_weak(&self) -> Self {
Expand Down

0 comments on commit 40c38fd

Please sign in to comment.