Skip to content

Commit 93b10c5

Browse files
committed
Modify cfg
Signed-off-by: Taehun Lim <taehun.lim@42dot.ai>
1 parent 729fd3c commit 93b10c5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

rclrs/src/context.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,11 @@ impl Context {
8383
/// # Ok::<(), RclrsError>(())
8484
/// ```
8585
pub fn domain_id(&self) -> usize {
86-
let mut rcl_context = self.rcl_context_mtx.lock().unwrap();
8786
let mut domain_id: usize = 0;
87+
8888
#[cfg(not(ros_distro = "foxy"))]
8989
let ret = unsafe {
90+
let mut rcl_context = self.rcl_context_mtx.lock().unwrap();
9091
// SAFETY: No preconditions for this function.
9192
rcl_context_get_domain_id(&mut *rcl_context, &mut domain_id)
9293
};

0 commit comments

Comments
 (0)