From 333df30e779f3067e2201f7d67d3344a6025e253 Mon Sep 17 00:00:00 2001 From: MinerSebas Date: Mon, 19 Apr 2021 16:53:44 +0200 Subject: [PATCH] Added missing Component Bound to Res<> and ResMut<> --- crates/bevy_ecs/src/system/system_param.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/bevy_ecs/src/system/system_param.rs b/crates/bevy_ecs/src/system/system_param.rs index f6db10ba5ad75..514c21b69354d 100644 --- a/crates/bevy_ecs/src/system/system_param.rs +++ b/crates/bevy_ecs/src/system/system_param.rs @@ -167,7 +167,7 @@ impl_query_set!(); /// Panics when used as a [`SystemParameter`](SystemParam) if the resource does not exist. /// /// Use `Option>` instead if the resource might not always exist. -pub struct Res<'w, T> { +pub struct Res<'w, T: Component> { value: &'w T, ticks: &'w ComponentTicks, last_change_tick: u32, @@ -311,7 +311,7 @@ impl<'a, T: Component> SystemParamFetch<'a> for OptionResState { /// Panics when used as a [`SystemParameter`](SystemParam) if the resource does not exist. /// /// Use `Option>` instead if the resource might not always exist. -pub struct ResMut<'w, T> { +pub struct ResMut<'w, T: Component> { value: &'w mut T, ticks: &'w mut ComponentTicks, last_change_tick: u32,