File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 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> {
426426 }
427427
428428 /// 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
430437 #[ inline]
431438 pub fn get_arc ( & self , id : impl Into < AssetId < A > > ) -> Option < Arc < A > > {
432439 match id. into ( ) {
You can’t perform that action at this time.
0 commit comments