diff --git a/include/zenoh_commons.h b/include/zenoh_commons.h index 6e45ed3d1..ac121840b 100644 --- a/include/zenoh_commons.h +++ b/include/zenoh_commons.h @@ -346,8 +346,8 @@ typedef struct z_owned_closure_query_t { * To check if `val` is still valid, you may use `z_X_check(&val)` (or `z_check(val)` if your compiler supports `_Generic`), which will return `true` if `val` is valid. */ #if defined(TARGET_ARCH_X86_64) -typedef struct ALIGN(8) z_owned_reply_t { - uint64_t _0[28]; +typedef struct ALIGN(16) z_owned_reply_t { + uint64_t _0[30]; } z_owned_reply_t; #endif #if defined(TARGET_ARCH_AARCH64) diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 743f7cd99..83025f972 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,2 +1,2 @@ [toolchain] -channel = "1.72.0" +channel = "1.77.0" diff --git a/src/get.rs b/src/get.rs index 07bf0de65..49cd59799 100644 --- a/src/get.rs +++ b/src/get.rs @@ -49,8 +49,8 @@ type ReplyInner = Option; /// /// To check if `val` is still valid, you may use `z_X_check(&val)` (or `z_check(val)` if your compiler supports `_Generic`), which will return `true` if `val` is valid. #[cfg(target_arch = "x86_64")] -#[repr(C, align(8))] -pub struct z_owned_reply_t([u64; 28]); +#[repr(C, align(16))] +pub struct z_owned_reply_t([u64; 30]); #[cfg(target_arch = "aarch64")] #[repr(C, align(16))] diff --git a/src/liveliness.rs b/src/liveliness.rs index 0a7c689dd..c9d48c92d 100644 --- a/src/liveliness.rs +++ b/src/liveliness.rs @@ -173,7 +173,7 @@ pub extern "C" fn zc_liveliness_declare_subscriber( return z_owned_subscriber_t::null(); }; let callback = core::mem::replace(callback, z_owned_closure_sample_t::empty()); - match session + let res = session .liveliness() .declare_subscriber(key) .callback(move |sample| { @@ -185,8 +185,8 @@ pub extern "C" fn zc_liveliness_declare_subscriber( let sample = z_sample_t::new(&sample, &owner); z_closure_sample_call(&callback, &sample) }) - .res() - { + .res(); + match res { Ok(token) => z_owned_subscriber_t::new(token), Err(e) => { log::error!("Failed to subscribe to liveliness: {e}"); diff --git a/src/querying_subscriber.rs b/src/querying_subscriber.rs index d407f9646..d46792bca 100644 --- a/src/querying_subscriber.rs +++ b/src/querying_subscriber.rs @@ -202,7 +202,7 @@ pub unsafe extern "C" fn ze_declare_querying_subscriber( .query_timeout(std::time::Duration::from_millis(options.query_timeout_ms)); } } - match sub + let res = sub .callback(move |sample| { let payload = sample.payload.contiguous(); let owner = match payload { @@ -212,8 +212,8 @@ pub unsafe extern "C" fn ze_declare_querying_subscriber( let sample = z_sample_t::new(&sample, &owner); z_closure_sample_call(&closure, &sample) }) - .res() - { + .res(); + match res { Ok(sub) => ze_owned_querying_subscriber_t::new(sub, session), Err(e) => { log::debug!("{}", e);