Skip to content

Commit

Permalink
Rename ColliderView::as_shared_shape to ::to_shared_shape
Browse files Browse the repository at this point in the history
  • Loading branch information
sebcrozet committed Aug 6, 2023
1 parent 1dc7830 commit 65f198f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/geometry/shape_views/collider_view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,13 +154,13 @@ impl<'a> From<ColliderView<'a>> for TypedShape<'a> {

impl<'a> From<ColliderView<'a>> for SharedShape {
fn from(collider_view: ColliderView<'a>) -> SharedShape {
collider_view.as_shared_shape()
collider_view.to_shared_shape()
}
}

impl<'a> ColliderView<'a> {
/// Convert to [`parry::TypedShape`].
pub fn as_typed_shape(&self) -> TypedShape<'a> {
pub fn as_typed_shape(self) -> TypedShape<'a> {
match self {
ColliderView::Ball(BallView { raw: s }) => TypedShape::Ball(s),
ColliderView::Cuboid(CuboidView { raw: s }) => TypedShape::Cuboid(s),
Expand Down Expand Up @@ -208,8 +208,8 @@ impl<'a> ColliderView<'a> {
}

/// Convert to [`parry::SharedShape`].
pub fn as_shared_shape(&self) -> SharedShape {
match *self {
pub fn to_shared_shape(self) -> SharedShape {
match self {
ColliderView::Ball(BallView { raw }) => SharedShape::new(*raw),
ColliderView::Cuboid(CuboidView { raw }) => SharedShape::new(*raw),
ColliderView::Capsule(CapsuleView { raw }) => SharedShape::new(*raw),
Expand Down

0 comments on commit 65f198f

Please sign in to comment.