From 0d76a55d80dcee517012d1c3a5d6f7aae67dad2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Crozet?= Date: Sun, 5 May 2024 16:15:00 +0200 Subject: [PATCH] =?UTF-8?q?chore:=20don=E2=80=99t=20return=20&mut=20Self?= =?UTF-8?q?=20with=20GenericJoint::flip?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/dynamics/joint/generic_joint.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/dynamics/joint/generic_joint.rs b/src/dynamics/joint/generic_joint.rs index 98f9311..8c8a4aa 100644 --- a/src/dynamics/joint/generic_joint.rs +++ b/src/dynamics/joint/generic_joint.rs @@ -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 } }