Skip to content

Commit

Permalink
clippy fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mrDIMAS committed Jan 7, 2022
1 parent ab5f9af commit 5e04c7e
Showing 1 changed file with 17 additions and 19 deletions.
36 changes: 17 additions & 19 deletions src/scene/legacy_physics/dim3/desc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -381,26 +381,24 @@ impl ColliderShapeDesc {
ColliderShapeDesc::Trimesh(TrimeshDesc)
} else if shape.as_heightfield().is_some() {
ColliderShapeDesc::Heightfield(HeightfieldDesc)
} else if let Some(cylinder) = shape.as_cylinder() {
ColliderShapeDesc::Cylinder(CylinderDesc {
half_height: cylinder.half_height,
radius: cylinder.radius,
})
} else if let Some(round_cylinder) = shape.as_round_cylinder() {
ColliderShapeDesc::RoundCylinder(RoundCylinderDesc {
half_height: round_cylinder.base_shape.half_height,
radius: round_cylinder.base_shape.radius,
border_radius: round_cylinder.border_radius,
})
} else if let Some(cone) = shape.as_cone() {
ColliderShapeDesc::Cone(ConeDesc {
half_height: cone.half_height,
radius: cone.radius,
})
} else {
if let Some(cylinder) = shape.as_cylinder() {
ColliderShapeDesc::Cylinder(CylinderDesc {
half_height: cylinder.half_height,
radius: cylinder.radius,
})
} else if let Some(round_cylinder) = shape.as_round_cylinder() {
ColliderShapeDesc::RoundCylinder(RoundCylinderDesc {
half_height: round_cylinder.base_shape.half_height,
radius: round_cylinder.base_shape.radius,
border_radius: round_cylinder.border_radius,
})
} else if let Some(cone) = shape.as_cone() {
ColliderShapeDesc::Cone(ConeDesc {
half_height: cone.half_height,
radius: cone.radius,
})
} else {
unreachable!()
}
unreachable!()
}
}

Expand Down

0 comments on commit 5e04c7e

Please sign in to comment.