From 009f982956c1810c699eddc18a1f143df2b0862c Mon Sep 17 00:00:00 2001 From: Robert Swain Date: Sun, 23 Jan 2022 12:46:07 +0100 Subject: [PATCH] Update crates/bevy_render/src/render_ecs_resource.rs Co-authored-by: MinerSebas <66798382+MinerSebas@users.noreply.github.com> --- crates/bevy_render/src/render_ecs_resource.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/bevy_render/src/render_ecs_resource.rs b/crates/bevy_render/src/render_ecs_resource.rs index 4e9e4a2a107929..a5818db66bfd55 100644 --- a/crates/bevy_render/src/render_ecs_resource.rs +++ b/crates/bevy_render/src/render_ecs_resource.rs @@ -19,15 +19,15 @@ pub trait ExtractResource: Resource { /// /// Therefore it sets up the [`RenderStage::Extract`](crate::RenderStage::Extract) step /// for the specified [`Resource`]. -pub struct ExtractResourcePlugin(PhantomData); +pub struct ExtractResourcePlugin(PhantomData); -impl Default for ExtractResourcePlugin { +impl Default for ExtractResourcePlugin { fn default() -> Self { Self(PhantomData) } } -impl Plugin for ExtractResourcePlugin { +impl Plugin for ExtractResourcePlugin { fn build(&self, app: &mut App) { if let Ok(render_app) = app.get_sub_app_mut(RenderApp) { render_app.add_system_to_stage(RenderStage::Extract, extract_resource::); @@ -37,7 +37,7 @@ impl Plugin for ExtractResourcePlugin { /// This system extracts the resource of the corresponding [`Resource`] type /// by cloning it. -pub fn extract_resource(mut commands: Commands, resource: Res) { +pub fn extract_resource(mut commands: Commands, resource: Res) { if resource.is_changed() { commands.insert_resource(R::extract_resource(resource.into_inner())); }