mirror of
https://github.com/rtic-rs/rtic.git
synced 2025-12-18 05:45:19 +01:00
don't wrap static references in a Static
This commit is contained in:
parent
6ea9cda663
commit
f5a4d8e904
4 changed files with 10 additions and 19 deletions
|
|
@ -91,24 +91,19 @@ fn idle(
|
|||
let ty = &resource.ty;
|
||||
|
||||
rfields.push(quote! {
|
||||
pub #name: &'static mut ::#krate::Static<#ty>,
|
||||
pub #name: &'static mut #ty,
|
||||
});
|
||||
|
||||
rexprs.push(quote! {
|
||||
#name: #krate::Static::ref_mut(
|
||||
&mut #super_::#name,
|
||||
),
|
||||
#name: &mut #super_::#name,
|
||||
});
|
||||
} else {
|
||||
rfields.push(quote! {
|
||||
pub #name:
|
||||
&'static mut ::#krate::Static<::#device::#name>,
|
||||
pub #name: &'static mut ::#device::#name,
|
||||
});
|
||||
|
||||
rexprs.push(quote! {
|
||||
#name: ::#krate::Static::ref_mut(
|
||||
&mut *::#device::#name.get(),
|
||||
),
|
||||
#name: &mut *::#device::#name.get(),
|
||||
});
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue