File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -270,7 +270,7 @@ impl Node {
270
270
) -> Result < Arc < Service < T > > , RclrsError >
271
271
where
272
272
T : rosidl_runtime_rs:: Service ,
273
- F : Fn ( & rmw_request_id_t , T :: Request ) -> T :: Response + ' static + Send ,
273
+ F : FnMut ( & rmw_request_id_t , T :: Request ) -> T :: Response + ' static + Send ,
274
274
{
275
275
let service = Arc :: new ( Service :: < T > :: new (
276
276
Arc :: clone ( & self . rcl_node_mtx ) ,
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ pub trait ServiceBase: Send + Sync {
47
47
}
48
48
49
49
type ServiceCallback < Request , Response > =
50
- Box < dyn Fn ( & rmw_request_id_t , Request ) -> Response + ' static + Send > ;
50
+ Box < dyn FnMut ( & rmw_request_id_t , Request ) -> Response + ' static + Send > ;
51
51
52
52
/// Main class responsible for responding to requests sent by ROS clients.
53
53
///
79
79
// [`Node::create_service`], see the struct's documentation for the rationale
80
80
where
81
81
T : rosidl_runtime_rs:: Service ,
82
- F : Fn ( & rmw_request_id_t , T :: Request ) -> T :: Response + ' static + Send ,
82
+ F : FnMut ( & rmw_request_id_t , T :: Request ) -> T :: Response + ' static + Send ,
83
83
{
84
84
// SAFETY: Getting a zero-initialized value is always safe.
85
85
let mut rcl_service = unsafe { rcl_get_zero_initialized_service ( ) } ;
You can’t perform that action at this time.
0 commit comments