diff options
author | 2021-12-25 13:17:16 +0100 | |
---|---|---|
committer | 2021-12-25 13:17:16 +0100 | |
commit | c297b4ee8d619d903b1b1673e47a8df25637d01b (patch) | |
tree | 8845460c0caa37e4d60b60c09c0ca5a3fdcc5df4 /macros/src | |
parent | c78177c37e3192c7a41a3ea8e7c139751c1a8989 (diff) | |
download | rtic-c297b4ee8d619d903b1b1673e47a8df25637d01b.tar.gz rtic-c297b4ee8d619d903b1b1673e47a8df25637d01b.tar.zst rtic-c297b4ee8d619d903b1b1673e47a8df25637d01b.zip |
Clippy lints
Diffstat (limited to 'macros/src')
-rw-r--r-- | macros/src/codegen.rs | 2 | ||||
-rw-r--r-- | macros/src/codegen/local_resources.rs | 2 | ||||
-rw-r--r-- | macros/src/codegen/shared_resources.rs | 2 | ||||
-rw-r--r-- | macros/src/codegen/shared_resources_struct.rs | 2 | ||||
-rw-r--r-- | macros/src/codegen/util.rs | 6 |
5 files changed, 7 insertions, 7 deletions
diff --git a/macros/src/codegen.rs b/macros/src/codegen.rs index 422de5f3..10050843 100644 --- a/macros/src/codegen.rs +++ b/macros/src/codegen.rs @@ -107,7 +107,7 @@ pub fn app(app: &App, analysis: &Analysis, extra: &Extra) -> TokenStream2 { .map(|(_, monotonic)| { let name = &monotonic.ident; let name_str = &name.to_string(); - let ident = util::monotonic_ident(&name_str); + let ident = util::monotonic_ident(name_str); let doc = &format!( "This module holds the static implementation for `{}::now()`", name_str diff --git a/macros/src/codegen/local_resources.rs b/macros/src/codegen/local_resources.rs index ff534862..50621c32 100644 --- a/macros/src/codegen/local_resources.rs +++ b/macros/src/codegen/local_resources.rs @@ -51,7 +51,7 @@ pub fn codegen( let expr = &task_local.expr; let attrs = &task_local.attrs; - let mangled_name = util::declared_static_local_resource_ident(resource_name, &task_name); + let mangled_name = util::declared_static_local_resource_ident(resource_name, task_name); // For future use // let doc = format!(" RTIC internal: {}:{}", file!(), line!()); diff --git a/macros/src/codegen/shared_resources.rs b/macros/src/codegen/shared_resources.rs index ddd3824c..a115b7c2 100644 --- a/macros/src/codegen/shared_resources.rs +++ b/macros/src/codegen/shared_resources.rs @@ -21,7 +21,7 @@ pub fn codegen( for (name, res) in &app.shared_resources { let cfgs = &res.cfgs; let ty = &res.ty; - let mangled_name = &util::static_shared_resource_ident(&name); + let mangled_name = &util::static_shared_resource_ident(name); // late resources in `util::link_section_uninit` let section = util::link_section_uninit(); diff --git a/macros/src/codegen/shared_resources_struct.rs b/macros/src/codegen/shared_resources_struct.rs index 61226517..7ae8d808 100644 --- a/macros/src/codegen/shared_resources_struct.rs +++ b/macros/src/codegen/shared_resources_struct.rs @@ -32,7 +32,7 @@ pub fn codegen(ctxt: Context, needs_lt: &mut bool, app: &App) -> (TokenStream2, None }; let ty = &res.ty; - let mangled_name = util::static_shared_resource_ident(&name); + let mangled_name = util::static_shared_resource_ident(name); let shared_name = util::need_to_lock_ident(name); if !res.properties.lock_free { diff --git a/macros/src/codegen/util.rs b/macros/src/codegen/util.rs index 831718ae..e8654345 100644 --- a/macros/src/codegen/util.rs +++ b/macros/src/codegen/util.rs @@ -76,7 +76,7 @@ pub fn interrupt_ident() -> Ident { } pub fn timer_queue_marker_ident() -> Ident { - mark_internal_name(&"TIMER_QUEUE_MARKER") + mark_internal_name("TIMER_QUEUE_MARKER") } /// Whether `name` is an exception with configurable priority @@ -225,7 +225,7 @@ pub fn rq_ident(priority: u8) -> Ident { /// Generates an identifier for the `enum` of `schedule`-able tasks pub fn schedule_t_ident() -> Ident { - Ident::new(&"SCHED_T", Span::call_site()) + Ident::new("SCHED_T", Span::call_site()) } /// Generates an identifier for the `enum` of `spawn`-able tasks @@ -278,7 +278,7 @@ pub fn need_to_lock_ident(name: &Ident) -> Ident { /// The name to get better RT flag errors pub fn rt_err_ident() -> Ident { Ident::new( - &"you_must_enable_the_rt_feature_for_the_pac_in_your_cargo_toml", + "you_must_enable_the_rt_feature_for_the_pac_in_your_cargo_toml", Span::call_site(), ) } |