diff --git a/examples/turtle_teleop/main.rs b/examples/turtle_teleop/main.rs index 60b1449e..5670e5ba 100644 --- a/examples/turtle_teleop/main.rs +++ b/examples/turtle_teleop/main.rs @@ -354,7 +354,7 @@ fn ros2_loop( status_subscription: service_qos, }; - let mut rotate_action_client = ros_node + let rotate_action_client = ros_node .create_action_client::( ServiceMapping::Enhanced, &Name::new("/turtle1", "rotate_absolute").unwrap(), diff --git a/src/action/client.rs b/src/action/client.rs index 15887840..fc8ef12e 100644 --- a/src/action/client.rs +++ b/src/action/client.rs @@ -54,26 +54,24 @@ where &self.my_action_name } - pub fn goal_client( - &mut self, - ) -> &mut Client, SendGoalResponse>> { - &mut self.my_goal_client + pub fn goal_client(&self) -> &Client, SendGoalResponse>> { + &self.my_goal_client } pub fn cancel_client( - &mut self, - ) -> &mut Client> { - &mut self.my_cancel_client + &self, + ) -> &Client> { + &self.my_cancel_client } pub fn result_client( - &mut self, - ) -> &mut Client>> { - &mut self.my_result_client + &self, + ) -> &Client>> { + &self.my_result_client } - pub fn feedback_subscription(&mut self) -> &mut Subscription> { - &mut self.my_feedback_subscription + pub fn feedback_subscription(&self) -> &Subscription> { + &self.my_feedback_subscription } - pub fn status_subscription(&mut self) -> &mut Subscription { - &mut self.my_status_subscription + pub fn status_subscription(&self) -> &Subscription { + &self.my_status_subscription } /// Returns and id of the Request and id for the Goal.