diff --git a/macros/src/codegen.rs b/macros/src/codegen.rs index 422de5f37c..100508432d 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 ff53486249..50621c32c0 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 ddd3824c89..a115b7c20a 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 6122651795..7ae8d8086e 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 831718aed9..e865434528 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(), ) } diff --git a/src/lib.rs b/src/lib.rs index 5fe35a95e2..a1a911aece 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -95,12 +95,20 @@ impl RacyCell { } /// Get `*mut T` + /// + /// # Safety + /// + /// See documentation notes for [`RacyCell`] #[inline(always)] pub unsafe fn get_mut(&self) -> *mut T { self.0.get() } /// Get `*const T` + /// + /// # Safety + /// + /// See documentation notes for [`RacyCell`] #[inline(always)] pub unsafe fn get(&self) -> *const T { self.0.get() diff --git a/src/tq.rs b/src/tq.rs index 0121de5fe7..26ebbd96c3 100644 --- a/src/tq.rs +++ b/src/tq.rs @@ -176,6 +176,6 @@ where Mono: Monotonic, { fn partial_cmp(&self, other: &Self) -> Option { - Some(self.cmp(&other)) + Some(self.cmp(other)) } }