diff --git a/zbus/tests/e2e.rs b/zbus/tests/e2e.rs index 7419f528a..f989f4bc4 100644 --- a/zbus/tests/e2e.rs +++ b/zbus/tests/e2e.rs @@ -266,7 +266,7 @@ impl MyIface { #[zbus(property)] fn test_header_prop( &self, - #[zbus(header)] header: Option>, + #[zbus(header)] header: Option<&Header<'_>>, #[zbus(connection)] connection: &Connection, #[zbus(object_server)] object_server: &ObjectServer, #[zbus(signal_emitter)] emitter: SignalEmitter<'_>, @@ -283,7 +283,7 @@ impl MyIface { fn set_test_header_prop( &self, value: bool, - #[zbus(header)] header: Option>, + #[zbus(header)] header: Option<&Header<'_>>, #[zbus(connection)] connection: &Connection, #[zbus(object_server)] object_server: &ObjectServer, #[zbus(signal_emitter)] emitter: SignalEmitter<'_>, diff --git a/zbus_macros/src/iface.rs b/zbus_macros/src/iface.rs index d29def692..3c6b81970 100644 --- a/zbus_macros/src/iface.rs +++ b/zbus_macros/src/iface.rs @@ -1038,9 +1038,7 @@ fn get_args_from_inputs( let header_arg = &input.pat; header_arg_decl = match method_type { - MethodType::Property(_) => Some(quote! { - let #header_arg = ::std::option::Option::<&#zbus::message::Header<'_>>::cloned(header); - }), + MethodType::Property(_) => Some(quote! { let #header_arg = header; }), _ => Some(quote! { let #header_arg = message.header(); }), }; } else if signal_context || signal_emitter {