Added missing Component Bound to Res<> and ResMut<> (#1962)
Fixes #1838
This commit is contained in:
parent
f1ddd7a2ad
commit
e29a899b90
@ -167,7 +167,7 @@ impl_query_set!();
|
|||||||
/// Panics when used as a [`SystemParameter`](SystemParam) if the resource does not exist.
|
/// Panics when used as a [`SystemParameter`](SystemParam) if the resource does not exist.
|
||||||
///
|
///
|
||||||
/// Use `Option<Res<T>>` instead if the resource might not always exist.
|
/// Use `Option<Res<T>>` instead if the resource might not always exist.
|
||||||
pub struct Res<'w, T> {
|
pub struct Res<'w, T: Component> {
|
||||||
value: &'w T,
|
value: &'w T,
|
||||||
ticks: &'w ComponentTicks,
|
ticks: &'w ComponentTicks,
|
||||||
last_change_tick: u32,
|
last_change_tick: u32,
|
||||||
@ -311,7 +311,7 @@ impl<'a, T: Component> SystemParamFetch<'a> for OptionResState<T> {
|
|||||||
/// Panics when used as a [`SystemParameter`](SystemParam) if the resource does not exist.
|
/// Panics when used as a [`SystemParameter`](SystemParam) if the resource does not exist.
|
||||||
///
|
///
|
||||||
/// Use `Option<ResMut<T>>` instead if the resource might not always exist.
|
/// Use `Option<ResMut<T>>` instead if the resource might not always exist.
|
||||||
pub struct ResMut<'w, T> {
|
pub struct ResMut<'w, T: Component> {
|
||||||
value: &'w mut T,
|
value: &'w mut T,
|
||||||
ticks: &'w mut ComponentTicks,
|
ticks: &'w mut ComponentTicks,
|
||||||
last_change_tick: u32,
|
last_change_tick: u32,
|
||||||
|
Loading…
Reference in New Issue
Block a user