Skip to content

Commit fd0e08a

Browse files
authored
Change the order of arguments to load_erased. (#23440)
# Objective - Requested by cart: https://discord.com/channels/691052431525675048/749332104487108618/1484705643330797678 ## Solution - Reorder the arguments of `load_erased`. - This makes it look more like `load` (the type comes first and then the path). - Paths could also be quite long, so it's nice to get the "short argument" out of the way first. No migration guide because this was introduced in the 0.19 cycle.
1 parent d7048fa commit fd0e08a

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

crates/bevy_asset/src/reflect.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ impl LoadFromPath for AssetServer {
419419
type_id: TypeId,
420420
path: AssetPath<'static>,
421421
) -> UntypedHandle {
422-
self.load_erased(path, type_id)
422+
self.load_erased(type_id, path)
423423
}
424424
}
425425

crates/bevy_asset/src/server/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,8 +374,8 @@ impl AssetServer {
374374
/// `type_id`.
375375
pub fn load_erased<'a>(
376376
&self,
377-
path: impl Into<AssetPath<'a>>,
378377
type_id: TypeId,
378+
path: impl Into<AssetPath<'a>>,
379379
) -> UntypedHandle {
380380
self.load_erased_with_meta_transform(path, type_id, None, ())
381381
}

0 commit comments

Comments
 (0)