forked from StrafesNET/strafe-project
drop Send requirement
This commit is contained in:
parent
e944e7d91a
commit
eb004cbb21
@ -3,11 +3,11 @@ pub type INWorker<'a,Task>=CompatNWorker<'a,Task>;
|
||||
|
||||
pub struct CompatNWorker<'a,Task>{
|
||||
data:std::marker::PhantomData<Task>,
|
||||
f:Box<dyn FnMut(Task)+Send+'a>,
|
||||
f:Box<dyn FnMut(Task)+'a>,
|
||||
}
|
||||
|
||||
impl<'a,Task> CompatNWorker<'a,Task>{
|
||||
pub fn new(f:impl FnMut(Task)+Send+'a)->CompatNWorker<'a,Task>{
|
||||
pub fn new(f:impl FnMut(Task)+'a)->CompatNWorker<'a,Task>{
|
||||
Self{
|
||||
data:std::marker::PhantomData,
|
||||
f:Box::new(f),
|
||||
|
Loading…
Reference in New Issue
Block a user