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:
akimakinai 2024-08-30 10:22:11 +09:00 committed by GitHub
parent f2cf02408f
commit 147768adf6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -415,7 +415,7 @@ impl AssetServer {
) -> Handle<LoadedUntypedAsset> {
let path = path.into().into_owned();
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) => {
CowArc::Owned(format!("{source}--{UNTYPED_SOURCE_SUFFIX}").into())
}