Skip to content

Commit 24ba70a

Browse files
committed
test(rcl-z): final review
1 parent babfc36 commit 24ba70a

4 files changed

Lines changed: 1 addition & 55 deletions

File tree

rcl-z/src/context.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,14 +163,12 @@ pub extern "C" fn rcl_logging_configure_with_output_handler(
163163
RCL_RET_OK as _
164164
}
165165

166-
// TODO: Not implemented yet
167166
#[unsafe(no_mangle)]
168167
pub extern "C" fn rcl_logging_rosout_enabled() -> bool {
169168
// Rosout logging is always enabled in our implementation
170169
true
171170
}
172171

173-
// TODO: Not implemented yet
174172
#[unsafe(no_mangle)]
175173
pub extern "C" fn rcl_logging_rosout_init_publisher_for_node(
176174
_node: *mut rcl_node_t,
@@ -181,7 +179,6 @@ pub extern "C" fn rcl_logging_rosout_init_publisher_for_node(
181179
RCL_RET_OK as _
182180
}
183181

184-
// TODO: Not implemented yet
185182
#[unsafe(no_mangle)]
186183
pub extern "C" fn rcl_logging_rosout_fini_publisher_for_node(
187184
_node: *mut rcl_node_t,

rcl-z/src/graph.rs

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -102,40 +102,6 @@ pub unsafe extern "C" fn rcl_names_and_types_init(
102102
RCL_RET_OK as _
103103
}
104104

105-
// impl TryFrom<EndpointEntity> for rcl_names_and_types_t {
106-
// type Error = NulError;
107-
// fn try_from(value: EndpointEntity) -> Result<Self, Self::Error> {
108-
// pub names: rcutils_string_array_t,
109-
// pub types: *mut rcutils_string_array_t,
110-
// }
111-
// }
112-
113-
// impl<S> From<Vec<S>> for rcutils_string_array_t
114-
// where
115-
// S: AsRef<str>,
116-
// {
117-
// fn from(strings: Vec<S>) -> Self {
118-
// let mut c_strings: Vec<*mut c_char> = strings
119-
// .into_iter()
120-
// .map(|s| {
121-
// CString::new(s.as_ref())
122-
// .expect("CString::new failed")
123-
// .into_raw()
124-
// })
125-
// .collect();
126-
//
127-
// let len = c_strings.len();
128-
// let ptr = c_strings.as_mut_ptr();
129-
// std::mem::forget(c_strings);
130-
//
131-
// Self {
132-
// data: ptr,
133-
// size: len,
134-
// allocator: rcutils_allocator_t::default(),
135-
// }
136-
// }
137-
// }
138-
139105
impl From<Vec<CString>> for rcutils_string_array_t {
140106
fn from(strings: Vec<CString>) -> Self {
141107
let mut c_strings: Vec<*mut c_char> = strings.into_iter().map(|s| s.into_raw()).collect();

rcl-z/src/utils.rs

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -48,23 +48,6 @@ impl Notifier {
4848
}
4949
}
5050

51-
// pub struct DebugCStr(pub *const c_char);
52-
//
53-
// impl std::fmt::Debug for DebugCStr {
54-
// fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
55-
// unsafe {
56-
// if self.0.is_null() {
57-
// write!(f, "null")
58-
// } else {
59-
// match CStr::from_ptr(self.0).to_str() {
60-
// Ok(s) => write!(f, "{:?}", s),
61-
// Err(_) => write!(f, "invalid utf-8"),
62-
// }
63-
// }
64-
// }
65-
// }
66-
// }
67-
6851
#[macro_export]
6952
macro_rules! impl_has_impl_ptr {
7053
($ctype:ty, $cimpl_type:ty, $impl_type:ty) => {

rcl-z/tests/test_events.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ mod test_msgs_support;
99

1010
use std::ptr;
1111

12-
// Dummy status structs since rcl-z doesn't support events
12+
// Status structs for event testing
1313
#[repr(C)]
1414
#[derive(Debug, Default, Clone)]
1515
pub struct rmw_offered_deadline_missed_status_t {

0 commit comments

Comments
 (0)