aboutsummaryrefslogtreecommitdiff
path: root/src/dynamics/rigid_body_set.rs
diff options
context:
space:
mode:
authorEmil Ernerfeldt <emil.ernerfeldt@gmail.com>2021-02-04 13:11:04 +0100
committerEmil Ernerfeldt <emil.ernerfeldt@gmail.com>2021-02-04 13:11:04 +0100
commit85bc81d4fce29bf628d31cb978aa482e564aab90 (patch)
tree61cf130d7ad8d1162c9709345b0e7f794bdb1e46 /src/dynamics/rigid_body_set.rs
parent88cde90425364ee66b6b04f1c5e384423b96e369 (diff)
downloadrapier-85bc81d4fce29bf628d31cb978aa482e564aab90.tar.gz
rapier-85bc81d4fce29bf628d31cb978aa482e564aab90.tar.bz2
rapier-85bc81d4fce29bf628d31cb978aa482e564aab90.zip
Make clippy a bit happier
Diffstat (limited to 'src/dynamics/rigid_body_set.rs')
-rw-r--r--src/dynamics/rigid_body_set.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/dynamics/rigid_body_set.rs b/src/dynamics/rigid_body_set.rs
index 36cf4d3..79d5827 100644
--- a/src/dynamics/rigid_body_set.rs
+++ b/src/dynamics/rigid_body_set.rs
@@ -106,6 +106,11 @@ impl RigidBodySet {
self.bodies.len()
}
+ /// `true` if there are no rigid bodies in this set.
+ pub fn is_empty(&self) -> bool {
+ self.bodies.is_empty()
+ }
+
/// Is the given body handle valid?
pub fn contains(&self, handle: RigidBodyHandle) -> bool {
self.bodies.contains(handle.0)