Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - Fix bad bounds for NonSend SystemParams #2325

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions crates/bevy_ecs/src/system/system_param.rs
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ impl<'a, T: Component> SystemParamFetch<'a> for RemovedComponentsState<T> {
/// # Panics
///
/// Panics when used as a `SystemParameter` if the resource does not exist.
pub struct NonSend<'w, T> {
pub struct NonSend<'w, T: 'static> {
pub(crate) value: &'w T,
ticks: ComponentTicks,
last_change_tick: u32,
Expand All @@ -702,7 +702,7 @@ where
}
}

impl<'w, T: Component> NonSend<'w, T> {
impl<'w, T: 'static> NonSend<'w, T> {
/// Returns true if (and only if) this resource been added since the last execution of this
/// system.
pub fn is_added(&self) -> bool {
Expand Down Expand Up @@ -815,7 +815,7 @@ pub struct NonSendMut<'a, T: 'static> {
change_tick: u32,
}

impl<'w, T: Component> NonSendMut<'w, T> {
impl<'w, T: 'static> NonSendMut<'w, T> {
/// Returns true if (and only if) this resource been added since the last execution of this
/// system.
pub fn is_added(&self) -> bool {
Expand Down