Skip to content

Commit fcde06d

Browse files
committed
Rename run_string_getter* -> call_string_getter*
1 parent 54931bb commit fcde06d

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

rclrs/src/node/builder.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use crate::rcl_bindings::*;
22
use crate::{
3-
node::run_string_getter_with_handle, resolve_parameter_overrides, Context, Node, RclrsError,
3+
node::call_string_getter_with_handle, resolve_parameter_overrides, Context, Node, RclrsError,
44
ToResult,
55
};
66

@@ -184,7 +184,7 @@ impl NodeBuilder {
184184

185185
let _parameter_map = unsafe {
186186
let fqn =
187-
run_string_getter_with_handle(&node_handle, rcl_node_get_fully_qualified_name);
187+
call_string_getter_with_handle(&node_handle, rcl_node_get_fully_qualified_name);
188188
resolve_parameter_overrides(fqn, &context_handle.global_arguments)?
189189
};
190190

rclrs/src/node/mod.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ impl Node {
117117
/// # Ok::<(), RclrsError>(())
118118
/// ```
119119
pub fn name(&self) -> String {
120-
self.run_string_getter(rcl_node_get_name)
120+
self.call_string_getter(rcl_node_get_name)
121121
}
122122

123123
/// Returns the namespace of the node.
@@ -143,7 +143,7 @@ impl Node {
143143
/// # Ok::<(), RclrsError>(())
144144
/// ```
145145
pub fn namespace(&self) -> String {
146-
self.run_string_getter(rcl_node_get_namespace)
146+
self.call_string_getter(rcl_node_get_namespace)
147147
}
148148

149149
/// Returns the fully qualified name of the node.
@@ -163,15 +163,15 @@ impl Node {
163163
/// # Ok::<(), RclrsError>(())
164164
/// ```
165165
pub fn fully_qualified_name(&self) -> String {
166-
self.run_string_getter(rcl_node_get_fully_qualified_name)
166+
self.call_string_getter(rcl_node_get_fully_qualified_name)
167167
}
168168

169169
// Helper for name(), namespace(), fully_qualified_name()
170-
fn run_string_getter(
170+
fn call_string_getter(
171171
&self,
172172
getter: unsafe extern "C" fn(*const rcl_node_t) -> *const c_char,
173173
) -> String {
174-
unsafe { run_string_getter_with_handle(&*self.handle.lock(), getter) }
174+
unsafe { call_string_getter_with_handle(&*self.handle.lock(), getter) }
175175
}
176176

177177
/// Creates a [`Publisher`][1].
@@ -270,11 +270,11 @@ impl Node {
270270
}
271271
}
272272

273-
// Helper used to implement run_string_getter(), but also used to get the FQN in the Node::new()
274-
// function, which is why it's not merged into Node::run_string_getter().
273+
// Helper used to implement call_string_getter(), but also used to get the FQN in the Node::new()
274+
// function, which is why it's not merged into Node::call_string_getter().
275275
// This function is unsafe since it's possible to pass in an rcl_node_t with dangling
276276
// pointers etc.
277-
unsafe fn run_string_getter_with_handle(
277+
unsafe fn call_string_getter_with_handle(
278278
rcl_node: &rcl_node_t,
279279
getter: unsafe extern "C" fn(*const rcl_node_t) -> *const c_char,
280280
) -> String {

0 commit comments

Comments
 (0)