Skip to content

Commit 1c5064b

Browse files
estevennmm
andauthored
Apply suggestions from code review
Co-authored-by: Nikolai Morin <[email protected]>
1 parent e1b02d2 commit 1c5064b

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

rclrs/src/node/client.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ impl Drop for ClientHandle {
3535
let rcl_node_mtx = &mut *self.rcl_node_mtx.lock();
3636
// SAFETY: No preconditions for this function
3737
unsafe {
38-
rcl_client_fini(handle as *mut _, rcl_node_mtx as *mut _);
38+
rcl_client_fini(handle, rcl_node_mtx);
3939
}
4040
}
4141
}

rclrs/src/node/service.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,13 @@ impl Drop for ServiceHandle {
3434
let node_handle = &mut *self.node_handle.lock();
3535
// SAFETY: No preconditions for this function
3636
unsafe {
37-
rcl_service_fini(handle as *mut _, node_handle as *mut _);
37+
rcl_service_fini(handle, node_handle);
3838
}
3939
}
4040
}
4141

42-
/// Trait to be implemented by concrete Service structs
42+
/// Trait to be implemented by concrete Service structs.
43+
///
4344
/// See [`Service<T>`] for an example
4445
pub trait ServiceBase: Send + Sync {
4546
/// Internal function to get a reference to the `rcl` handle.

0 commit comments

Comments
 (0)