fix tests

This commit is contained in:
Quaternions 2023-10-14 15:41:59 -07:00
parent 381b7b3c2f
commit d18f2168e4
2 changed files with 6 additions and 1 deletions

View File

@ -418,6 +418,11 @@ impl Body {
self.time=time; self.time=time;
} }
} }
impl std::fmt::Display for Body{
fn fmt(&self,f:&mut std::fmt::Formatter<'_>)->std::fmt::Result{
write!(f,"p({}) v({}) a({}) t({})",self.position,self.velocity,self.acceleration,self.time)
}
}
impl Default for PhysicsState{ impl Default for PhysicsState{
fn default() -> Self { fn default() -> Self {

View File

@ -100,7 +100,7 @@ fn test_worker() {
}; };
worker.send(task).unwrap(); worker.send(task).unwrap();
println!("value={:?}",worker.grab_clone()); println!("value={}",worker.grab_clone());
// wait long enough to see print from final task // wait long enough to see print from final task
thread::sleep(std::time::Duration::from_secs(1)); thread::sleep(std::time::Duration::from_secs(1));