cleanup a few hidden imports in frame-support (#1770)

Just making a few hidden imports cleaner and hidden in docs.

---------

Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>
This commit is contained in:
Kian Paimani
2023-10-17 09:09:03 +01:00
committed by GitHub
parent fcc1bb414b
commit e10de2e283
4 changed files with 7 additions and 11 deletions
@@ -81,11 +81,12 @@ pub fn build(input: TokenStream) -> TokenStream {
let imports = match crate_name("sp-runtime") {
Ok(FoundCrate::Itself) => quote!(
extern crate sp_runtime as _sp_runtime;
#[doc(hidden)]
pub use sp_runtime as _sp_runtime;
),
Ok(FoundCrate::Name(sp_runtime)) => {
let ident = syn::Ident::new(&sp_runtime, Span::call_site());
quote!( extern crate #ident as _sp_runtime; )
quote!( #[doc(hidden)] pub use #ident as _sp_runtime; )
},
Err(e) => syn::Error::new(Span::call_site(), e).to_compile_error(),
};