Skip to content

Commit

Permalink
don't use let else in debug rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
barsoosayque committed Sep 15, 2023
1 parent 9b4f2d3 commit 4e8abaf
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/render/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,8 @@ impl<'world, 'state> BevyLinesRenderBackend<'world, 'state, '_, '_, '_> {
}

fn drawing_enabled(&self, object: DebugRenderObject) -> bool {
let Some(ref visible_colliders) = self.visible_colliders else { return true; };

match object {
DebugRenderObject::Collider(h, ..) => {
match (object, &self.visible_colliders) {
(DebugRenderObject::Collider(h, ..), Some(visible_colliders)) => {
let collider = self.context.colliders.get(h);
collider
.map(|co| {
Expand Down

0 comments on commit 4e8abaf

Please sign in to comment.