From 0df94c91b9f61603357c167fc8f034833ea8e7a1 Mon Sep 17 00:00:00 2001 From: Xavier L'Heureux Date: Fri, 17 May 2024 16:07:26 -0400 Subject: [PATCH] =?UTF-8?q?Compile=20on=20targets=20where=20c=5Fchar=20?= =?UTF-8?q?=E2=89=A0=20i8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix function which took a i8 where c_char is more correct. Fixes compilation where those two types aren't equivalent (ex: aarch64) --- rclrs/src/parameter/service.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rclrs/src/parameter/service.rs b/rclrs/src/parameter/service.rs index a52e3e555..7c8ffe62d 100644 --- a/rclrs/src/parameter/service.rs +++ b/rclrs/src/parameter/service.rs @@ -123,11 +123,11 @@ fn get_parameters(req: GetParameters_Request, map: &ParameterMap) -> GetParamete } fn list_parameters(req: ListParameters_Request, map: &ParameterMap) -> ListParameters_Response { - let check_parameter_name_depth = |substring: &[i8]| { + let check_parameter_name_depth = |substring: &[std::os::raw::c_char]| { if req.depth == ListParameters_Request::DEPTH_RECURSIVE { return true; } - u64::try_from(substring.iter().filter(|c| **c == ('.' as i8)).count()).unwrap() < req.depth + u64::try_from(substring.iter().filter(|c| **c == ('.' as _)).count()).unwrap() < req.depth }; let names: Sequence<_> = map .storage