diff --git a/Cargo.toml b/Cargo.toml index 39fdbca..f3d1ace 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,7 +23,7 @@ include = [ [workspace.dependencies] prosa-utils = { version = "0.4.0", path = "prosa_utils", default-features = false } -prosa-macros = { version = "0.4.0", path = "prosa_macros" } +prosa-macros = { version = "0.4.1", path = "prosa_macros" } thiserror = "2" aquamarine = "0.6" bytes = "1" diff --git a/prosa_book/src/ch02-02-creation.md b/prosa_book/src/ch02-02-creation.md index 7f2a993..f425b3b 100644 --- a/prosa_book/src/ch02-02-creation.md +++ b/prosa_book/src/ch02-02-creation.md @@ -20,7 +20,7 @@ where + std::marker::Sized + std::clone::Clone + std::fmt::Debug - + prosa_utils::msg::tvf::Tvf + + prosa::core::msg::Tvf + std::default::Default, { /// Method called when the processor spawns @@ -65,7 +65,7 @@ where + std::marker::Sized + std::clone::Clone + std::fmt::Debug - + prosa_utils::msg::tvf::Tvf + + prosa::core::msg::Tvf + std::default::Default, { /// Method to process incoming requests from internal @@ -89,7 +89,7 @@ where + std::marker::Sized + std::clone::Clone + std::fmt::Debug - + prosa_utils::msg::tvf::Tvf + + prosa::core::msg::Tvf + std::default::Default, { /// Method to process incoming requests from external system @@ -119,7 +119,7 @@ where + std::marker::Sized + std::clone::Clone + std::fmt::Debug - + prosa_utils::msg::tvf::Tvf + + prosa::core::msg::Tvf + std::default::Default, { const USER_AGENT: &str = "ProSA user agent"; diff --git a/prosa_macros/Cargo.toml b/prosa_macros/Cargo.toml index a74516b..6e2e619 100644 --- a/prosa_macros/Cargo.toml +++ b/prosa_macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "prosa-macros" -version = "0.4.0" +version = "0.4.1" authors.workspace = true description = "ProSA macros" homepage.workspace = true diff --git a/prosa_macros/src/proc.rs b/prosa_macros/src/proc.rs index 8f4a233..00a2683 100644 --- a/prosa_macros/src/proc.rs +++ b/prosa_macros/src/proc.rs @@ -92,7 +92,7 @@ fn add_message_generic(generics: &mut syn::Generics) -> syn::parse::Result<()> { generics.make_where_clause(); if let Some(ref mut where_clause) = generics.where_clause { let message_where: syn::WherePredicate = syn::parse2( - quote! { M: 'static + std::marker::Send + std::marker::Sync + std::marker::Sized + std::clone::Clone + std::fmt::Debug + prosa_utils::msg::tvf::Tvf + std::default::Default }, + quote! { M: 'static + std::marker::Send + std::marker::Sync + std::marker::Sized + std::clone::Clone + std::fmt::Debug + prosa::core::msg::Tvf + std::default::Default }, )?; where_clause.predicates.push(message_where); } else { @@ -160,7 +160,7 @@ fn generate_struct_impl_bus_param( Ok(quote! { impl #item_generics prosa::core::proc::ProcBusParam for #item_ident #item_generics where - M: 'static + std::marker::Send + std::marker::Sync + std::marker::Sized + std::clone::Clone + std::fmt::Debug + prosa_utils::msg::tvf::Tvf + std::default::Default, + M: 'static + std::marker::Send + std::marker::Sync + std::marker::Sized + std::clone::Clone + std::fmt::Debug + prosa::core::msg::Tvf + std::default::Default, { #[doc=concat!(" Getter of the ", stringify!(#item_ident), " processor ID")] fn get_proc_id(&self) -> u32 { @@ -195,7 +195,7 @@ fn generate_struct_impl_config( // The definition must be done for the protocol impl #item_generics prosa::core::proc::ProcConfig for #item_ident #item_generics where - M: 'static + std::marker::Send + std::marker::Sync + std::marker::Sized + std::clone::Clone + std::fmt::Debug + prosa_utils::msg::tvf::Tvf + std::default::Default, + M: 'static + std::marker::Send + std::marker::Sync + std::marker::Sized + std::clone::Clone + std::fmt::Debug + prosa::core::msg::Tvf + std::default::Default, { type Settings = #settings; @@ -234,7 +234,7 @@ fn generate_struct_impl_epilogue( // The definition must be done for the protocol impl #item_generics prosa::core::proc::ProcEpilogue for #item_ident #item_generics where - M: 'static + std::marker::Send + std::marker::Sync + std::marker::Sized + std::clone::Clone + std::fmt::Debug + prosa_utils::msg::tvf::Tvf + std::default::Default, + M: 'static + std::marker::Send + std::marker::Sync + std::marker::Sized + std::clone::Clone + std::fmt::Debug + prosa::core::msg::Tvf + std::default::Default, { fn get_proc_restart_delay(&self) -> (std::time::Duration, u32) { #restart_settings_quote