mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-23 07:12:29 +00:00
Merge pull request #345 from Liamolucko/forward-task-attributes
Forward attributes to generated task function
This commit is contained in:
commit
a4c0ee6df7
@ -110,7 +110,10 @@ pub fn task(args: TokenStream, item: TokenStream) -> TokenStream {
|
||||
quote!(impl ::core::future::Future + 'static)
|
||||
};
|
||||
|
||||
let attrs = &task_fn.attrs;
|
||||
|
||||
let result = quote! {
|
||||
#(#attrs)*
|
||||
#visibility fn #name(#args) -> #embassy_path::executor::SpawnToken<#impl_ty> {
|
||||
use #embassy_path::executor::raw::Task;
|
||||
#task_fn
|
||||
|
Loading…
Reference in New Issue
Block a user