diff options
author | 2022-02-18 19:38:48 +0100 | |
---|---|---|
committer | 2022-02-22 18:56:21 +0100 | |
commit | 5ed93bd1bf056f1d2b8632502300d7488df4e9df (patch) | |
tree | 2e1bf40e2eaeeb4b58c996c1659c8a7429e2a518 /macros/src/codegen/util.rs | |
parent | 57da1e0403510cafbdcf88e402b39ae6d3bf323e (diff) | |
download | rtic-5ed93bd1bf056f1d2b8632502300d7488df4e9df.tar.gz rtic-5ed93bd1bf056f1d2b8632502300d7488df4e9df.tar.zst rtic-5ed93bd1bf056f1d2b8632502300d7488df4e9df.zip |
Clippy with pedantic suggestions
Diffstat (limited to 'macros/src/codegen/util.rs')
-rw-r--r-- | macros/src/codegen/util.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/macros/src/codegen/util.rs b/macros/src/codegen/util.rs index 46eace4c..6a07732c 100644 --- a/macros/src/codegen/util.rs +++ b/macros/src/codegen/util.rs @@ -25,9 +25,9 @@ pub fn impl_mutex( cfgs: &[Attribute], resources_prefix: bool, name: &Ident, - ty: TokenStream2, + ty: &TokenStream2, ceiling: u8, - ptr: TokenStream2, + ptr: &TokenStream2, ) -> TokenStream2 { let (path, priority) = if resources_prefix { (quote!(shared_resources::#name), quote!(self.priority())) @@ -117,11 +117,11 @@ fn link_section_index() -> usize { INDEX.fetch_add(1, Ordering::Relaxed) } -// NOTE `None` means in shared memory -pub fn link_section_uninit() -> Option<TokenStream2> { +/// Add `link_section` attribute +pub fn link_section_uninit() -> TokenStream2 { let section = format!(".uninit.rtic{}", link_section_index()); - Some(quote!(#[link_section = #section])) + quote!(#[link_section = #section]) } // Regroups the inputs of a task |