Skip to content

Commit

Permalink
remove #[cfg(not(feature = unstable))] guards from z_subscriber_optio…
Browse files Browse the repository at this point in the history
…ns_t
  • Loading branch information
DenisBiryukov91 committed Sep 5, 2024
1 parent 2170e62 commit 3c92c2b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
2 changes: 0 additions & 2 deletions include/zenoh_commons.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 1 addition & 5 deletions src/subscriber.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<z_subscriber_options_t>) {
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
Expand Down

0 comments on commit 3c92c2b

Please sign in to comment.