Skip to content

Commit

Permalink
Revert IntoCollider addition
Browse files Browse the repository at this point in the history
  • Loading branch information
Jondolf committed Jan 27, 2024
1 parent de625ff commit 2f883b7
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions src/components/collider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,24 +180,6 @@ impl Default for Collider {
}
}

/// A trait for creating [`Collider`]s from other types.
pub trait IntoCollider {
/// Creates a [`Collider`] from `self`.
fn collider(&self) -> Collider;
}

impl IntoCollider for Circle {
fn collider(&self) -> Collider {
Collider::ball(self.radius)
}
}

impl<C: IntoCollider> From<C> for Collider {
fn from(value: C) -> Self {
value.collider()
}
}

impl fmt::Debug for Collider {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self.shape_scaled().as_typed_shape() {
Expand Down

0 comments on commit 2f883b7

Please sign in to comment.