Skip to content

Commit

Permalink
readd safety comment
Browse files Browse the repository at this point in the history
  • Loading branch information
soqb committed Feb 5, 2023
1 parent d9c713d commit ecf4c52
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crates/bevy_asset/src/reflect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ pub struct ReflectAsset {
assets_resource_type_id: TypeId,

get: fn(&World, HandleUntyped) -> Option<&dyn PartialReflect>,
// SAFETY:
// - may only be called with a [`IteriorMutableWorld`] which can be used to access the corresponding `Assets<T>` resource mutably
// - may only be used to access **at most one** access at once
get_unchecked_mut:
unsafe fn(UnsafeWorldCell<'_>, HandleUntyped) -> Option<&mut dyn PartialReflect>,
add: fn(&mut World, &dyn PartialReflect) -> HandleUntyped,
Expand Down

0 comments on commit ecf4c52

Please sign in to comment.