Skip to content

Commit

Permalink
Add track_callers to shared_resource methods
Browse files Browse the repository at this point in the history
  • Loading branch information
TekhnaeRaav committed Jun 20, 2024
1 parent 3fef32d commit a50d1f5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions framework_crates/bones_lib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ impl Game {
plugin.install(self);
self
}
#[track_caller]
/// Get the shared resource of a given type out of this [`Game`]s shared resources.
pub fn shared_resource<T: HasSchema>(&self) -> Option<Ref<T>> {
let res = self
Expand All @@ -219,6 +220,7 @@ impl Game {
}
}

#[track_caller]
/// Get the shared resource of a given type out of this [`Game`]s shared resources.
pub fn shared_resource_mut<T: HasSchema>(&self) -> Option<RefMut<T>> {
let res = self
Expand Down

0 comments on commit a50d1f5

Please sign in to comment.