From 3c92c2b6f425a2373a46452a85d007f884145786 Mon Sep 17 00:00:00 2001 From: Denis Biryukov Date: Thu, 5 Sep 2024 10:14:21 +0200 Subject: [PATCH] remove #[cfg(not(feature = unstable))] guards from z_subscriber_options_t --- include/zenoh_commons.h | 2 -- src/subscriber.rs | 6 +----- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/include/zenoh_commons.h b/include/zenoh_commons.h index c8126f487..05b33c8f0 100644 --- a/include/zenoh_commons.h +++ b/include/zenoh_commons.h @@ -619,12 +619,10 @@ typedef struct z_queryable_options_t { * Options passed to the `z_declare_subscriber()` function. */ typedef struct z_subscriber_options_t { -#if !defined(UNSTABLE) /** * Dummy field to avoid having fieldless struct */ uint8_t _0; -#endif } z_subscriber_options_t; /** * Options passed to the `z_delete()` function. diff --git a/src/subscriber.rs b/src/subscriber.rs index 324ebc38c..35e3e4a48 100644 --- a/src/subscriber.rs +++ b/src/subscriber.rs @@ -50,17 +50,13 @@ pub unsafe extern "C" fn z_subscriber_loan(this_: &z_owned_subscriber_t) -> &z_l #[repr(C)] pub struct z_subscriber_options_t { /// Dummy field to avoid having fieldless struct - #[cfg(not(feature = "unstable"))] pub _0: u8, } /// Constructs the default value for `z_subscriber_options_t`. #[no_mangle] pub extern "C" fn z_subscriber_options_default(this_: &mut MaybeUninit) { - this_.write(z_subscriber_options_t { - #[cfg(not(feature = "unstable"))] - _0: 0, - }); + this_.write(z_subscriber_options_t { _0: 0 }); } /// Constructs and declares a subscriber for a given key expression. Dropping subscriber