From b41ee47115509ba5ed302c684c0c36b6a3e3f76f Mon Sep 17 00:00:00 2001 From: Dario Nieuwenhuis Date: Mon, 3 Apr 2023 01:11:42 +0200 Subject: [PATCH] executor: unify export mod. --- embassy-executor/src/lib.rs | 12 ++++-------- embassy-macros/src/macros/cortex_m_interrupt_take.rs | 4 ++-- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/embassy-executor/src/lib.rs b/embassy-executor/src/lib.rs index 4c7e2f4c..8707995b 100644 --- a/embassy-executor/src/lib.rs +++ b/embassy-executor/src/lib.rs @@ -46,11 +46,13 @@ cfg_if::cfg_if! { } } +/// Implementation details for embassy macros. +/// Do not use. Used for macros and HALs only. Not covered by semver guarantees. #[doc(hidden)] -/// Implementation details for embassy macros. DO NOT USE. -pub mod export { +pub mod _export { #[cfg(feature = "rtos-trace")] pub use rtos_trace::trace; + pub use static_cell::StaticCell; /// Expands the given block of code when `embassy-executor` is compiled with /// the `rtos-trace-interrupt` feature. @@ -75,9 +77,3 @@ pub mod raw; mod spawner; pub use spawner::*; - -/// Do not use. Used for macros and HALs only. Not covered by semver guarantees. -#[doc(hidden)] -pub mod _export { - pub use static_cell::StaticCell; -} diff --git a/embassy-macros/src/macros/cortex_m_interrupt_take.rs b/embassy-macros/src/macros/cortex_m_interrupt_take.rs index e2ebf98c..4806d1c1 100644 --- a/embassy-macros/src/macros/cortex_m_interrupt_take.rs +++ b/embassy-macros/src/macros/cortex_m_interrupt_take.rs @@ -10,12 +10,12 @@ pub fn run(name: syn::Ident) -> Result { let (isr_enter, isr_exit) = ( quote! { ::embassy_executor::rtos_trace_interrupt! { - ::embassy_executor::export::trace::isr_enter(); + ::embassy_executor::_export::trace::isr_enter(); } }, quote! { ::embassy_executor::rtos_trace_interrupt! { - ::embassy_executor::export::trace::isr_exit(); + ::embassy_executor::_export::trace::isr_exit(); } }, );