chore: don’t return &mut Self with GenericJoint::flip

This commit is contained in:
Sébastien Crozet
2024-05-05 16:15:00 +02:00
committed by Sébastien Crozet
parent 4332818e02
commit 0d76a55d80

View File

@@ -498,7 +498,7 @@ impl GenericJoint {
}
/// Flips the orientation of the joint, including limits and motors.
pub fn flip(&mut self) -> &mut Self {
pub fn flip(&mut self) {
std::mem::swap(&mut self.local_frame1, &mut self.local_frame2);
let coupled_bits = self.coupled_axes.bits();
@@ -513,8 +513,6 @@ impl GenericJoint {
self.motors[dim].target_vel = -self.motors[dim].target_vel;
self.motors[dim].target_pos = -self.motors[dim].target_pos;
}
self
}
}