remove lifetime bound from IntoSystem

This commit is contained in:
Carter Anderson 2020-05-28 10:51:53 -07:00
parent b96fec5f44
commit 1d4a574b52
2 changed files with 3 additions and 3 deletions

View file

@ -130,7 +130,7 @@ pub fn impl_fn_systems(_input: TokenStream) -> TokenStream {
#(#resource: ResourceSet<PreparedResources = #resource> + 'static + Clone,)*
#(#view: for<'b> View<'b> + DefaultFilter<Filter = #filter> + ViewElement,
#filter: EntityFilter + Sync + 'static),*
> IntoSystem<'a, (#(#command_buffer)*), (#(#resource,)*), (#(#view,)*)> for Func
> IntoSystem<(#(#command_buffer)*), (#(#resource,)*), (#(#view,)*)> for Func
where
Func: FnMut(#(&mut #command_buffer,)* #(#resource,)* #(#view),*) + Send + Sync + 'static,
#(<#view as View<'a>>::Iter: Iterator<Item = #view>),*

View file

@ -4,7 +4,6 @@ use crate::{
system_fn_types::{FuncSystem, FuncSystemFnWrapper},
Access, SystemAccess, SystemId, SystemQuery,
};
use legion_fn_system_macro::impl_fn_systems;
use bit_set::BitSet;
use fxhash::FxHashMap;
use legion_core::{
@ -14,12 +13,13 @@ use legion_core::{
query::{DefaultFilter, IntoQuery, View, ViewElement},
storage::ComponentTypeId,
};
use legion_fn_system_macro::impl_fn_systems;
use std::marker::PhantomData;
// TODO: add params for component access
// TODO: add subworld to function parameters
// TODO: somehow support filters
pub trait IntoSystem<'a, CommandBuffer, Resources, Components> {
pub trait IntoSystem<CommandBuffer, Resources, Components> {
fn system_id(self, id: SystemId) -> Box<dyn Schedulable>;
fn system_named(self, name: &'static str) -> Box<dyn Schedulable>;
fn system(self) -> Box<dyn Schedulable>;