Skip to content

Commit ac5554a

Browse files
committed
Rename cfg attribute to ros_distro
1 parent 45d9af5 commit ac5554a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

rclrs/build.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ fn get_env_var_or_abort(env_var: &'static str) -> String {
1717
}
1818

1919
fn main() {
20-
let distro = get_env_var_or_abort(ROS_DISTRO);
21-
println!("cargo:rustc-cfg=distro=\"{distro}\"");
20+
let ros_distro = get_env_var_or_abort(ROS_DISTRO);
21+
println!("cargo:rustc-cfg=ros_distro=\"{ros_distro}\"");
2222

2323
let mut builder = bindgen::Builder::default()
2424
.header("src/rcl_wrapper.h")

rclrs/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ pub fn spin_once(node: &Node, timeout: Option<Duration>) -> Result<(), RclReturn
5555
/// This function additionally checks that the context is still valid.
5656
pub fn spin(node: &Node) -> Result<(), RclReturnCode> {
5757
// The context_is_valid functions exists only to abstract away ROS distro differences
58-
#[cfg(distro = "foxy")]
58+
#[cfg(ros_distro = "foxy")]
5959
// SAFETY: No preconditions for this function.
6060
let context_is_valid = || unsafe { rcl_context_is_valid(&mut *node.context.lock()) };
61-
#[cfg(not(distro = "foxy"))]
61+
#[cfg(not(ros_distro = "foxy"))]
6262
// SAFETY: No preconditions for this function.
6363
let context_is_valid = || unsafe { rcl_context_is_valid(&*node.context.lock()) };
6464

0 commit comments

Comments
 (0)