From 65f198f035f638ffd0f8e9b0a7ce79db2b0d8f5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Crozet?= Date: Sun, 6 Aug 2023 13:45:42 +0200 Subject: [PATCH] Rename ColliderView::as_shared_shape to ::to_shared_shape --- src/geometry/shape_views/collider_view.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/geometry/shape_views/collider_view.rs b/src/geometry/shape_views/collider_view.rs index 0adbbaf5..f69ef842 100644 --- a/src/geometry/shape_views/collider_view.rs +++ b/src/geometry/shape_views/collider_view.rs @@ -154,13 +154,13 @@ impl<'a> From> for TypedShape<'a> { impl<'a> From> 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), @@ -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),