aboutsummaryrefslogtreecommitdiff
path: root/src_testbed/physics/mod.rs
diff options
context:
space:
mode:
authorSébastien Crozet <sebcrozet@dimforge.com>2024-01-27 16:49:53 +0100
committerSébastien Crozet <sebastien@crozet.re>2024-01-27 17:13:08 +0100
commitda92e5c2837b27433286cf0dd9d887fd44dda254 (patch)
tree00428ce290288f5c64e53dee13d88ffdde4df0ca /src_testbed/physics/mod.rs
parentaef873f20e7a1ee66b9d4c066884fa794048587b (diff)
downloadrapier-da92e5c2837b27433286cf0dd9d887fd44dda254.tar.gz
rapier-da92e5c2837b27433286cf0dd9d887fd44dda254.tar.bz2
rapier-da92e5c2837b27433286cf0dd9d887fd44dda254.zip
Fix clippy and enable clippy on CI
Diffstat (limited to 'src_testbed/physics/mod.rs')
-rw-r--r--src_testbed/physics/mod.rs10
1 files changed, 8 insertions, 2 deletions
diff --git a/src_testbed/physics/mod.rs b/src_testbed/physics/mod.rs
index 60214da..26a55c7 100644
--- a/src_testbed/physics/mod.rs
+++ b/src_testbed/physics/mod.rs
@@ -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() {}
}
}