delete compat worker

This commit is contained in:
Quaternions 2023-10-19 17:57:04 -07:00
parent b760a4bc65
commit 8043862c99

View File

@ -120,31 +120,6 @@ impl<Task:Send+'static> QNWorker<Task>{
}
}
pub struct CompatCRWorker<Task,Value:Clone,F>{
data:std::marker::PhantomData<Task>,
f:F,
value:Value,
}
impl<Task,Value:Clone,F:FnMut(Task)->Value> CompatCRWorker<Task,Value,F>{
pub fn new(value:Value,f:F) -> Self {
Self {
f,
value,
data:std::marker::PhantomData,
}
}
pub fn send(&mut self,task:Task)->Result<(),()>{
self.value=(self.f)(task);
Ok(())
}
pub fn grab_clone(&self)->Value{
self.value.clone()
}
}
#[test]//How to run this test with printing: cargo test --release -- --nocapture
fn test_worker() {
println!("hiiiii");