Skip to content

Commit 079bbd4

Browse files
committed
Switch to create_result_response() in rclrs
1 parent b1cdd7e commit 079bbd4

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

rclrs/src/action/server.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -543,11 +543,10 @@ where
543543
self.result_requests.lock().unwrap().entry(uuid).or_insert(vec![]).push(request_id);
544544
}
545545
} else {
546-
type RmwResponse<T> = <<<T as ActionImpl>::GetResultService as rosidl_runtime_rs::Service>::Response as Message>::RmwMsg;
547-
let mut response_rmw = RmwResponse::<T>::default();
548546
// TODO(nwn): Include action_msgs__msg__GoalStatus__STATUS_UNKNOWN in the rcl
549547
// bindings.
550-
<T as ActionImpl>::set_result_response_status(&mut response_rmw, 0);
548+
let null_response = <T::Result as Message>::RmwMsg::default();
549+
let mut response_rmw = <T as ActionImpl>::create_result_response(0, null_response);
551550
self.send_result_response(request_id, &mut response_rmw)?;
552551
}
553552

0 commit comments

Comments
 (0)