From 6381611e89385d4e5a6e1460830acdf3ba0a276b Mon Sep 17 00:00:00 2001 From: Carter Anderson Date: Wed, 13 May 2020 17:52:47 -0700 Subject: [PATCH] Resource -> Res, Ref->Com --- crates/bevy_app/src/event/event.rs | 4 +- crates/bevy_asset/src/lib.rs | 4 +- crates/bevy_core/src/time.rs | 4 +- .../src/frame_time_diagnostics_plugin.rs | 6 +- .../src/print_diagnostics_plugin.rs | 12 +-- crates/bevy_input/src/system.rs | 4 +- crates/bevy_legion/legion_core/src/lib.rs | 3 +- crates/bevy_legion/legion_systems/src/lib.rs | 6 +- .../legion_systems/src/system_fn.rs | 12 +-- .../legion_systems/src/system_fn_types.rs | 78 +++++++++---------- crates/bevy_render/src/shader/uniform.rs | 8 +- .../wgpu_resource_diagnostics_plugin.rs | 8 +- examples/2d/sprite.rs | 4 +- examples/3d/load_model.rs | 4 +- examples/3d/parenting.rs | 6 +- examples/3d/scene.rs | 4 +- examples/3d/spawner.rs | 12 +-- examples/3d/texture.rs | 6 +- .../example_plugin/src/lib.rs | 4 +- examples/app/plugin.rs | 2 +- examples/diagnostics/custom_diagnostic.rs | 4 +- examples/ecs/ecs_guide.rs | 36 ++++----- examples/ecs/event.rs | 10 +-- examples/input/input_keyboard.rs | 16 ++-- examples/input/input_mouse.rs | 6 +- examples/shader/shader_custom_material.rs | 10 +-- examples/shader/shader_defs.rs | 10 +-- examples/ui/text.rs | 4 +- examples/ui/ui.rs | 4 +- examples/ui/ui_bench.rs | 10 +-- examples/window/multiple_windows.rs | 2 +- src/prelude.rs | 4 +- 32 files changed, 153 insertions(+), 154 deletions(-) diff --git a/crates/bevy_app/src/event/event.rs b/crates/bevy_app/src/event/event.rs index 83a8999baf..b07486d2a9 100644 --- a/crates/bevy_app/src/event/event.rs +++ b/crates/bevy_app/src/event/event.rs @@ -1,4 +1,4 @@ -use legion::prelude::{ResourceMut, Resources}; +use legion::prelude::{ResMut, Resources}; use std::marker::PhantomData; struct EventInstance { @@ -205,7 +205,7 @@ impl Events { } /// A system that calls [Events::update] once per frame. - pub fn update_system(mut events: ResourceMut) { + pub fn update_system(mut events: ResMut) { events.update(); } diff --git a/crates/bevy_asset/src/lib.rs b/crates/bevy_asset/src/lib.rs index c1db51b0df..37fb383a27 100644 --- a/crates/bevy_asset/src/lib.rs +++ b/crates/bevy_asset/src/lib.rs @@ -76,8 +76,8 @@ impl Assets { } pub fn asset_event_system( - mut events: ResourceMut>>, - mut assets: ResourceMut>, + mut events: ResMut>>, + mut assets: ResMut>, ) { events.extend(assets.events.drain()) } diff --git a/crates/bevy_core/src/time.rs b/crates/bevy_core/src/time.rs index 0d29d6a093..e14cb03d73 100644 --- a/crates/bevy_core/src/time.rs +++ b/crates/bevy_core/src/time.rs @@ -32,10 +32,10 @@ impl Time { } } -pub fn start_timer_system(mut time: ResourceMut