File tree 1 file changed +8
-1
lines changed
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -426,7 +426,14 @@ impl<A: Asset> Assets<A> {
426
426
}
427
427
428
428
/// Retrieves the [`Arc`] of an [`Asset`] with the given `id`, if it exists.
429
- /// Note that this supports anything that implements `Into<AssetId<A>>`, which includes [`Handle`] and [`AssetId`].
429
+ ///
430
+ /// Note that this supports anything that implements `Into<AssetId<A>>`, which includes
431
+ /// [`Handle`] and [`AssetId`]. Be careful with holding the Arc indefinitely: holding the
432
+ /// [`Arc`] (or a [`Weak`]) prevents the asset from being mutated in place. This can incur
433
+ /// clones when using `get_cloned_mut`, or can just entirely block mutation when using
434
+ /// `get_inplace_mut`.
435
+ ///
436
+ /// [`Weak`]: std::sync::Weak
430
437
#[ inline]
431
438
pub fn get_arc ( & self , id : impl Into < AssetId < A > > ) -> Option < Arc < A > > {
432
439
match id. into ( ) {
You can’t perform that action at this time.
0 commit comments