File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -282,23 +282,15 @@ impl NodeBuilder {
282
282
// SAFETY: No preconditions for this function.
283
283
let mut node_options = unsafe { rcl_node_get_default_options ( ) } ;
284
284
285
- let ( cstring_args_results , mut parse_err_results ) : ( Vec < _ > , Vec < _ > ) = self
285
+ let cstring_args = self
286
286
. arguments
287
287
. iter ( )
288
288
. map ( |s| match CString :: new ( s. as_str ( ) ) {
289
289
Ok ( cstr) => Ok ( cstr) ,
290
290
Err ( err) => Err ( RclrsError :: StringContainsNul { s : s. clone ( ) , err } ) ,
291
291
} )
292
- . partition ( Result :: is_ok ) ;
292
+ . collect :: < Result < Vec < _ > , _ > > ( ) ? ;
293
293
294
- if let Some ( err) = parse_err_results. pop ( ) {
295
- return Err ( err. unwrap_err ( ) ) ;
296
- }
297
-
298
- let cstring_args = cstring_args_results
299
- . into_iter ( )
300
- . map ( |r| r. unwrap ( ) )
301
- . collect :: < Vec < _ > > ( ) ;
302
294
let cstring_arg_ptrs = cstring_args. iter ( ) . map ( |s| s. as_ptr ( ) ) . collect :: < Vec < _ > > ( ) ;
303
295
// SAFETY: Getting a zero-initialized value is always safe.
304
296
unsafe {
You can’t perform that action at this time.
0 commit comments