Use CowArc::Static (#14981)
# Objective - There's one occurence of `CowArc::Borrow` that wraps '&'static str` ## Solution - Replaces it with `CowArc::Static`. I don't think this change is important but I can't unsee it:) ## Testing - `cargo check` compiles fine
This commit is contained in:
parent
f2cf02408f
commit
147768adf6
@ -415,7 +415,7 @@ impl AssetServer {
|
|||||||
) -> Handle<LoadedUntypedAsset> {
|
) -> Handle<LoadedUntypedAsset> {
|
||||||
let path = path.into().into_owned();
|
let path = path.into().into_owned();
|
||||||
let untyped_source = AssetSourceId::Name(match path.source() {
|
let untyped_source = AssetSourceId::Name(match path.source() {
|
||||||
AssetSourceId::Default => CowArc::Borrowed(UNTYPED_SOURCE_SUFFIX),
|
AssetSourceId::Default => CowArc::Static(UNTYPED_SOURCE_SUFFIX),
|
||||||
AssetSourceId::Name(source) => {
|
AssetSourceId::Name(source) => {
|
||||||
CowArc::Owned(format!("{source}--{UNTYPED_SOURCE_SUFFIX}").into())
|
CowArc::Owned(format!("{source}--{UNTYPED_SOURCE_SUFFIX}").into())
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user