Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions rclrs/src/action/action_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,7 @@ impl<A: Action> RclPrimitive for ActionClientExecutable<A> {
RclPrimitiveKind::ActionClient
}

fn handle(&self) -> crate::RclPrimitiveHandle {
fn handle(&self) -> crate::RclPrimitiveHandle<'_> {
RclPrimitiveHandle::ActionClient(self.board.handle.lock())
}
}
Expand All @@ -863,7 +863,7 @@ pub struct ActionClientHandle {
}

impl ActionClientHandle {
fn lock(&self) -> MutexGuard<rcl_action_client_t> {
fn lock(&self) -> MutexGuard<'_, rcl_action_client_t> {
self.rcl_action_client.lock().unwrap()
}

Expand Down
4 changes: 2 additions & 2 deletions rclrs/src/action/action_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,7 @@ impl<A: Action> RclPrimitive for ActionServerExecutable<A> {
RclPrimitiveKind::ActionServer
}

fn handle(&self) -> RclPrimitiveHandle {
fn handle(&self) -> RclPrimitiveHandle<'_> {
RclPrimitiveHandle::ActionServer(self.board.handle.lock())
}
}
Expand All @@ -687,7 +687,7 @@ pub(crate) struct ActionServerHandle<A: Action> {
unsafe impl Send for rcl_action_server_t {}

impl<A: Action> ActionServerHandle<A> {
pub(super) fn lock(&self) -> MutexGuard<rcl_action_server_t> {
pub(super) fn lock(&self) -> MutexGuard<'_, rcl_action_server_t> {
self.rcl_action_server.lock().unwrap()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ impl<A: Action> ActionServerGoalHandle<A> {
}
}

pub(super) fn lock(&self) -> MutexGuard<rcl_action_goal_handle_t> {
pub(super) fn lock(&self) -> MutexGuard<'_, rcl_action_goal_handle_t> {
self.rcl_handle.lock().unwrap()
}

Expand Down
4 changes: 2 additions & 2 deletions rclrs/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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())
}

Expand Down Expand Up @@ -543,7 +543,7 @@ struct ClientHandle {
}

impl ClientHandle {
fn lock(&self) -> MutexGuard<rcl_client_t> {
fn lock(&self) -> MutexGuard<'_, rcl_client_t> {
self.rcl_client.lock().unwrap()
}
}
Expand Down
2 changes: 1 addition & 1 deletion rclrs/src/logging/log_params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion rclrs/src/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions rclrs/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ where
RclPrimitiveKind::Service
}

fn handle(&self) -> RclPrimitiveHandle {
fn handle(&self) -> RclPrimitiveHandle<'_> {
RclPrimitiveHandle::Service(self.handle.lock())
}
}
Expand All @@ -285,7 +285,7 @@ pub struct ServiceHandle {
}

impl ServiceHandle {
fn lock(&self) -> MutexGuard<rcl_service_t> {
fn lock(&self) -> MutexGuard<'_, rcl_service_t> {
self.rcl_service.lock().unwrap()
}

Expand Down
4 changes: 2 additions & 2 deletions rclrs/src/subscription.rs
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ where
RclPrimitiveKind::Subscription
}

fn handle(&self) -> RclPrimitiveHandle {
fn handle(&self) -> RclPrimitiveHandle<'_> {
RclPrimitiveHandle::Subscription(self.handle.lock())
}
}
Expand All @@ -311,7 +311,7 @@ pub(crate) struct SubscriptionHandle {
}

impl SubscriptionHandle {
pub(crate) fn lock(&self) -> MutexGuard<rcl_subscription_t> {
pub(crate) fn lock(&self) -> MutexGuard<'_, rcl_subscription_t> {
self.rcl_subscription.lock().unwrap()
}

Expand Down
2 changes: 1 addition & 1 deletion rclrs/src/timer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ impl<Scope: WorkScope> RclPrimitive for TimerExecutable<Scope> {
RclPrimitiveKind::Timer
}

fn handle(&self) -> RclPrimitiveHandle {
fn handle(&self) -> RclPrimitiveHandle<'_> {
RclPrimitiveHandle::Timer(self.handle.rcl_timer.lock().unwrap())
}
}
Expand Down
2 changes: 1 addition & 1 deletion rclrs/src/wait_set/guard_condition.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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())
}
}
Expand Down
2 changes: 1 addition & 1 deletion rclrs/src/wait_set/rcl_primitive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down