@@ -81,13 +81,13 @@ macro_rules! encode_wrapper {
8181}
8282
8383macro_rules! encode_arc_into_raw {
84- ( $default_expr : expr ) => {
84+ ( ) => {
8585 OutputFn :: new( |output: Option <& syn:: Ident >| -> TokenStream {
8686 match output {
8787 Some ( output) => {
8888 quote! { std:: sync:: Arc :: into_raw( std:: sync:: Arc :: new( #output) ) }
8989 }
90- None => quote! { $default_expr } ,
90+ None => quote! { std :: ptr :: null ( ) } ,
9191 }
9292 } )
9393 } ;
@@ -150,21 +150,21 @@ fn shared_bindings() -> TypeRegistry {
150150 . output ( encode_wrapper ! ( crate :: zenoh_id:: zenoh_ids_to_java_list) )
151151 // Returns: opaque Arc handles.
152152 . type_pair ( "ZResult<Session>" , "*const Session" )
153- . output ( encode_arc_into_raw ! ( std :: ptr :: null ( ) ) )
153+ . output ( encode_arc_into_raw ! ( ) )
154154 . type_pair ( "ZResult<Publisher<'static>>" , "*const Publisher<'static>" )
155- . output ( encode_arc_into_raw ! ( std :: ptr :: null ( ) ) )
155+ . output ( encode_arc_into_raw ! ( ) )
156156 . type_pair ( "ZResult<KeyExpr<'static>>" , "*const KeyExpr<'static>" )
157- . output ( encode_arc_into_raw ! ( std :: ptr :: null ( ) ) )
157+ . output ( encode_arc_into_raw ! ( ) )
158158 . type_pair ( "ZResult<Subscriber<()>>" , "*const Subscriber<()>" )
159- . output ( encode_arc_into_raw ! ( std :: ptr :: null ( ) ) )
159+ . output ( encode_arc_into_raw ! ( ) )
160160 . type_pair ( "ZResult<Querier<'static>>" , "*const Querier<'static>" )
161- . output ( encode_arc_into_raw ! ( std :: ptr :: null ( ) ) )
161+ . output ( encode_arc_into_raw ! ( ) )
162162 . type_pair ( "ZResult<Queryable<()>>" , "*const Queryable<()>" )
163- . output ( encode_arc_into_raw ! ( std :: ptr :: null ( ) ) )
163+ . output ( encode_arc_into_raw ! ( ) )
164164 . type_pair ( "ZResult<AdvancedSubscriber<()>>" , "*const AdvancedSubscriber<()>" )
165- . output ( encode_arc_into_raw ! ( std :: ptr :: null ( ) ) )
165+ . output ( encode_arc_into_raw ! ( ) )
166166 . type_pair ( "ZResult<AdvancedPublisher<'static>>" , "*const AdvancedPublisher<'static>" )
167- . output ( encode_arc_into_raw ! ( std :: ptr :: null ( ) ) )
167+ . output ( encode_arc_into_raw ! ( ) )
168168 // Unit returns: ZResult<()> with `()` wire type so the converter treats it as a no-return shape.
169169 . type_pair ( "ZResult<()>" , "()" )
170170 // Structs from ext.rs and nullable wrappers.
0 commit comments