Skip to content

Commit

Permalink
Use CowArc::Static (#14981)
Browse files Browse the repository at this point in the history
# 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
  • Loading branch information
akimakinai authored Aug 30, 2024
1 parent f2cf024 commit 147768a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/bevy_asset/src/server/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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())
}
Expand Down

0 comments on commit 147768a

Please sign in to comment.