diff --git a/rclrs/src/action/action_client.rs b/rclrs/src/action/action_client.rs index af02651d..78064ad4 100644 --- a/rclrs/src/action/action_client.rs +++ b/rclrs/src/action/action_client.rs @@ -847,7 +847,7 @@ impl RclPrimitive for ActionClientExecutable { RclPrimitiveKind::ActionClient } - fn handle(&self) -> crate::RclPrimitiveHandle { + fn handle(&self) -> crate::RclPrimitiveHandle<'_> { RclPrimitiveHandle::ActionClient(self.board.handle.lock()) } } @@ -863,7 +863,7 @@ pub struct ActionClientHandle { } impl ActionClientHandle { - fn lock(&self) -> MutexGuard { + fn lock(&self) -> MutexGuard<'_, rcl_action_client_t> { self.rcl_action_client.lock().unwrap() } diff --git a/rclrs/src/action/action_server.rs b/rclrs/src/action/action_server.rs index e75ea307..599e5983 100644 --- a/rclrs/src/action/action_server.rs +++ b/rclrs/src/action/action_server.rs @@ -662,7 +662,7 @@ impl RclPrimitive for ActionServerExecutable { RclPrimitiveKind::ActionServer } - fn handle(&self) -> RclPrimitiveHandle { + fn handle(&self) -> RclPrimitiveHandle<'_> { RclPrimitiveHandle::ActionServer(self.board.handle.lock()) } } @@ -687,7 +687,7 @@ pub(crate) struct ActionServerHandle { unsafe impl Send for rcl_action_server_t {} impl ActionServerHandle { - pub(super) fn lock(&self) -> MutexGuard { + pub(super) fn lock(&self) -> MutexGuard<'_, rcl_action_server_t> { self.rcl_action_server.lock().unwrap() } diff --git a/rclrs/src/action/action_server/action_server_goal_handle.rs b/rclrs/src/action/action_server/action_server_goal_handle.rs index 29f2ab40..dc133be6 100644 --- a/rclrs/src/action/action_server/action_server_goal_handle.rs +++ b/rclrs/src/action/action_server/action_server_goal_handle.rs @@ -31,7 +31,7 @@ impl ActionServerGoalHandle { } } - pub(super) fn lock(&self) -> MutexGuard { + pub(super) fn lock(&self) -> MutexGuard<'_, rcl_action_goal_handle_t> { self.rcl_handle.lock().unwrap() } diff --git a/rclrs/src/client.rs b/rclrs/src/client.rs index 461c5357..ecf4c379 100644 --- a/rclrs/src/client.rs +++ b/rclrs/src/client.rs @@ -420,7 +420,7 @@ where self.board.lock().unwrap().execute(&self.handle) } - fn handle(&self) -> RclPrimitiveHandle { + fn handle(&self) -> RclPrimitiveHandle<'_> { RclPrimitiveHandle::Client(self.handle.lock()) } @@ -543,7 +543,7 @@ struct ClientHandle { } impl ClientHandle { - fn lock(&self) -> MutexGuard { + fn lock(&self) -> MutexGuard<'_, rcl_client_t> { self.rcl_client.lock().unwrap() } } diff --git a/rclrs/src/logging/log_params.rs b/rclrs/src/logging/log_params.rs index 4b67edc5..99eed7ca 100644 --- a/rclrs/src/logging/log_params.rs +++ b/rclrs/src/logging/log_params.rs @@ -36,7 +36,7 @@ impl<'a> LogParams<'a> { } /// Get the logger name - pub fn get_logger_name(&self) -> &LoggerName { + pub fn get_logger_name(&self) -> &LoggerName<'_> { &self.logger_name } diff --git a/rclrs/src/node.rs b/rclrs/src/node.rs index 65ac4665..0583fb9d 100644 --- a/rclrs/src/node.rs +++ b/rclrs/src/node.rs @@ -1405,7 +1405,7 @@ impl NodeState { /// Enables usage of undeclared parameters for this node. /// /// Returns a [`Parameters`] struct that can be used to get and set all parameters. - pub fn use_undeclared_parameters(&self) -> Parameters { + pub fn use_undeclared_parameters(&self) -> Parameters<'_> { self.parameter.allow_undeclared(); Parameters { interface: &self.parameter, diff --git a/rclrs/src/service.rs b/rclrs/src/service.rs index 596ef1f8..1450c272 100644 --- a/rclrs/src/service.rs +++ b/rclrs/src/service.rs @@ -265,7 +265,7 @@ where RclPrimitiveKind::Service } - fn handle(&self) -> RclPrimitiveHandle { + fn handle(&self) -> RclPrimitiveHandle<'_> { RclPrimitiveHandle::Service(self.handle.lock()) } } @@ -285,7 +285,7 @@ pub struct ServiceHandle { } impl ServiceHandle { - fn lock(&self) -> MutexGuard { + fn lock(&self) -> MutexGuard<'_, rcl_service_t> { self.rcl_service.lock().unwrap() } diff --git a/rclrs/src/subscription.rs b/rclrs/src/subscription.rs index aca8fe9e..be195b8f 100644 --- a/rclrs/src/subscription.rs +++ b/rclrs/src/subscription.rs @@ -291,7 +291,7 @@ where RclPrimitiveKind::Subscription } - fn handle(&self) -> RclPrimitiveHandle { + fn handle(&self) -> RclPrimitiveHandle<'_> { RclPrimitiveHandle::Subscription(self.handle.lock()) } } @@ -311,7 +311,7 @@ pub(crate) struct SubscriptionHandle { } impl SubscriptionHandle { - pub(crate) fn lock(&self) -> MutexGuard { + pub(crate) fn lock(&self) -> MutexGuard<'_, rcl_subscription_t> { self.rcl_subscription.lock().unwrap() } diff --git a/rclrs/src/timer.rs b/rclrs/src/timer.rs index da31017e..9d64e99c 100644 --- a/rclrs/src/timer.rs +++ b/rclrs/src/timer.rs @@ -506,7 +506,7 @@ impl RclPrimitive for TimerExecutable { RclPrimitiveKind::Timer } - fn handle(&self) -> RclPrimitiveHandle { + fn handle(&self) -> RclPrimitiveHandle<'_> { RclPrimitiveHandle::Timer(self.handle.rcl_timer.lock().unwrap()) } } diff --git a/rclrs/src/wait_set/guard_condition.rs b/rclrs/src/wait_set/guard_condition.rs index 16abd9c0..030874aa 100644 --- a/rclrs/src/wait_set/guard_condition.rs +++ b/rclrs/src/wait_set/guard_condition.rs @@ -218,7 +218,7 @@ impl RclPrimitive for GuardConditionExecutable { RclPrimitiveKind::GuardCondition } - fn handle(&self) -> RclPrimitiveHandle { + fn handle(&self) -> RclPrimitiveHandle<'_> { RclPrimitiveHandle::GuardCondition(self.handle.rcl_guard_condition.lock().unwrap()) } } diff --git a/rclrs/src/wait_set/rcl_primitive.rs b/rclrs/src/wait_set/rcl_primitive.rs index 61a6c2d0..c59efc54 100644 --- a/rclrs/src/wait_set/rcl_primitive.rs +++ b/rclrs/src/wait_set/rcl_primitive.rs @@ -27,7 +27,7 @@ pub trait RclPrimitive: Send + Sync { fn kind(&self) -> RclPrimitiveKind; /// Provide the handle for this primitive - fn handle(&self) -> RclPrimitiveHandle; + fn handle(&self) -> RclPrimitiveHandle<'_>; } /// Enum to describe the kind of an executable.