Fix clippy and enable clippy on CI

This commit is contained in:
Sébastien Crozet
2024-01-27 16:49:53 +01:00
committed by Sébastien Crozet
parent aef873f20e
commit da92e5c283
81 changed files with 420 additions and 468 deletions

View File

@@ -86,6 +86,12 @@ pub struct PhysicsState {
pub hooks: Box<dyn PhysicsHooks>,
}
impl Default for PhysicsState {
fn default() -> Self {
Self::new()
}
}
impl PhysicsState {
pub fn new() -> Self {
Self {
@@ -113,7 +119,7 @@ pub struct PhysicsEvents {
impl PhysicsEvents {
pub fn poll_all(&self) {
while let Ok(_) = self.collision_events.try_recv() {}
while let Ok(_) = self.contact_force_events.try_recv() {}
while self.collision_events.try_recv().is_ok() {}
while self.contact_force_events.try_recv().is_ok() {}
}
}