Skip to content

Commit 5e04c7e

Browse files
committed
clippy fix
1 parent ab5f9af commit 5e04c7e

File tree

1 file changed

+17
-19
lines changed
  • src/scene/legacy_physics/dim3

1 file changed

+17
-19
lines changed

src/scene/legacy_physics/dim3/desc.rs

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -381,26 +381,24 @@ impl ColliderShapeDesc {
381381
ColliderShapeDesc::Trimesh(TrimeshDesc)
382382
} else if shape.as_heightfield().is_some() {
383383
ColliderShapeDesc::Heightfield(HeightfieldDesc)
384+
} else if let Some(cylinder) = shape.as_cylinder() {
385+
ColliderShapeDesc::Cylinder(CylinderDesc {
386+
half_height: cylinder.half_height,
387+
radius: cylinder.radius,
388+
})
389+
} else if let Some(round_cylinder) = shape.as_round_cylinder() {
390+
ColliderShapeDesc::RoundCylinder(RoundCylinderDesc {
391+
half_height: round_cylinder.base_shape.half_height,
392+
radius: round_cylinder.base_shape.radius,
393+
border_radius: round_cylinder.border_radius,
394+
})
395+
} else if let Some(cone) = shape.as_cone() {
396+
ColliderShapeDesc::Cone(ConeDesc {
397+
half_height: cone.half_height,
398+
radius: cone.radius,
399+
})
384400
} else {
385-
if let Some(cylinder) = shape.as_cylinder() {
386-
ColliderShapeDesc::Cylinder(CylinderDesc {
387-
half_height: cylinder.half_height,
388-
radius: cylinder.radius,
389-
})
390-
} else if let Some(round_cylinder) = shape.as_round_cylinder() {
391-
ColliderShapeDesc::RoundCylinder(RoundCylinderDesc {
392-
half_height: round_cylinder.base_shape.half_height,
393-
radius: round_cylinder.base_shape.radius,
394-
border_radius: round_cylinder.border_radius,
395-
})
396-
} else if let Some(cone) = shape.as_cone() {
397-
ColliderShapeDesc::Cone(ConeDesc {
398-
half_height: cone.half_height,
399-
radius: cone.radius,
400-
})
401-
} else {
402-
unreachable!()
403-
}
401+
unreachable!()
404402
}
405403
}
406404

0 commit comments

Comments
 (0)