Skip to content

Commit

Permalink
JointArrayBuilder::joints return self (#67)
Browse files Browse the repository at this point in the history
Co-authored-by: Aemulation <[email protected]>
  • Loading branch information
DarioCatarrinho and Aemulation authored Apr 9, 2024
1 parent bf3e898 commit c1528c7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion nidhogg/src/types/joint_array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ impl<T: Clone> FillExt<T> for JointArray<T> {

impl<T> JointArrayBuilder<T> {
/// Set all the joint values to the corresponding values from the provided [`JointArray`].
pub fn joints(mut self, joints: JointArray<T>) {
pub fn joints(mut self, joints: JointArray<T>) -> Self {
self.head_pitch = Some(joints.head_pitch);
self.head_yaw = Some(joints.head_yaw);

Expand Down Expand Up @@ -388,6 +388,8 @@ impl<T> JointArrayBuilder<T> {
self.right_elbow_roll = Some(joints.right_elbow_roll);
self.right_wrist_yaw = Some(joints.right_wrist_yaw);
self.right_hand = Some(joints.right_hand);

self
}

/// Set the `head_pitch` and `head_yaw` values to the corresponding values from the provided [`HeadJoints`].
Expand Down

0 comments on commit c1528c7

Please sign in to comment.