Skip to content

Commit e9e20c8

Browse files
committed
style: reorder remove_resource
This makes the declaration order consistent with the surrounding methods of `Commands::remove_resource`. This is an opinionated change that I would be fine with reverting.
1 parent 0c3f52a commit e9e20c8

File tree

1 file changed

+5
-5
lines changed
  • crates/bevy_ecs/src/system/commands

1 file changed

+5
-5
lines changed

crates/bevy_ecs/src/system/commands/mod.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1122,18 +1122,18 @@ fn init_resource<R: Resource + FromWorld>(world: &mut World) {
11221122
world.init_resource::<R>();
11231123
}
11241124

1125-
/// A [`Command`] that removes the [resource](Resource) `R` from the world.
1126-
fn remove_resource<R: Resource>(world: &mut World) {
1127-
world.remove_resource::<R>();
1128-
}
1129-
11301125
/// A [`Command`] that inserts a [`Resource`] into the world.
11311126
fn insert_resource<R: Resource>(resource: R) -> impl Command {
11321127
move |world: &mut World| {
11331128
world.insert_resource(resource);
11341129
}
11351130
}
11361131

1132+
/// A [`Command`] that removes the [resource](Resource) `R` from the world.
1133+
fn remove_resource<R: Resource>(world: &mut World) {
1134+
world.remove_resource::<R>();
1135+
}
1136+
11371137
/// [`EntityCommand`] to log the components of a given entity. See [`EntityCommands::log_components`].
11381138
fn log_components(entity: Entity, world: &mut World) {
11391139
let debug_infos: Vec<_> = world

0 commit comments

Comments
 (0)