Skip to content

Commit

Permalink
chore: "Listen to Clippy,
Browse files Browse the repository at this point in the history
she's trying to help you out."--Hansel, Zoolander (2001)
  • Loading branch information
shanecelis committed Sep 22, 2024
1 parent 93e5e6d commit f8f4c9c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
5 changes: 2 additions & 3 deletions src/dynamics/solver/joints/distance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,12 +170,12 @@ impl DistanceJoint {
/// Returns self with the minimum and maximum distances between the attached
/// bodies.
///
/// ``
/// ```
/// # #[cfg(feature = "2d")]
/// # use avian2d::prelude::*;
/// # #[cfg(feature = "3d")]
/// # use avian3d::prelude::*;
/// # use bevy::perlude::*;`
/// # use bevy::prelude::*;
/// # fn new_joint() -> DistanceJoint { DistanceJoint::new(Entity::PLACEHOLDER, Entity::PLACEHOLDER) }
/// let j: DistanceJoint = new_joint();
/// let a = j.with_length_limits(DistanceLimit { min: 0.0, max: 1.0 });
Expand All @@ -192,7 +192,6 @@ impl DistanceJoint {
..self
}
}

}

impl PositionConstraint for DistanceJoint {}
Expand Down
7 changes: 2 additions & 5 deletions src/dynamics/solver/joints/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,18 +199,15 @@ impl From<Scalar> for DistanceLimit {
fn from(limit: Scalar) -> DistanceLimit {
DistanceLimit {
min: limit,
max: limit
max: limit,
}
}
}

/// Convert the `(min, max)` pair into a distance limit.
impl From<(Scalar, Scalar)> for DistanceLimit {
fn from((min, max): (Scalar, Scalar)) -> DistanceLimit {
DistanceLimit {
min,
max
}
DistanceLimit { min, max }
}
}

Expand Down

0 comments on commit f8f4c9c

Please sign in to comment.