Skip to content

Commit e29a899

Browse files
committed
Added missing Component Bound to Res<> and ResMut<> (#1962)
Fixes #1838
1 parent f1ddd7a commit e29a899

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crates/bevy_ecs/src/system/system_param.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ impl_query_set!();
167167
/// Panics when used as a [`SystemParameter`](SystemParam) if the resource does not exist.
168168
///
169169
/// Use `Option<Res<T>>` instead if the resource might not always exist.
170-
pub struct Res<'w, T> {
170+
pub struct Res<'w, T: Component> {
171171
value: &'w T,
172172
ticks: &'w ComponentTicks,
173173
last_change_tick: u32,
@@ -311,7 +311,7 @@ impl<'a, T: Component> SystemParamFetch<'a> for OptionResState<T> {
311311
/// Panics when used as a [`SystemParameter`](SystemParam) if the resource does not exist.
312312
///
313313
/// Use `Option<ResMut<T>>` instead if the resource might not always exist.
314-
pub struct ResMut<'w, T> {
314+
pub struct ResMut<'w, T: Component> {
315315
value: &'w mut T,
316316
ticks: &'w mut ComponentTicks,
317317
last_change_tick: u32,

0 commit comments

Comments
 (0)