From 185b4b9cea295e20d88beb3e67c6c39c6b88611d Mon Sep 17 00:00:00 2001
From: Pavlo Khrystenko
Date: Wed, 8 Jan 2025 17:03:54 +0100
Subject: [PATCH] cleanup
---
.../api/proc-macro/src/impl_runtime_apis.rs | 21 +------------------
1 file changed, 1 insertion(+), 20 deletions(-)
diff --git a/substrate/primitives/api/proc-macro/src/impl_runtime_apis.rs b/substrate/primitives/api/proc-macro/src/impl_runtime_apis.rs
index 701b6dfbca7f..ab242dcc4e93 100644
--- a/substrate/primitives/api/proc-macro/src/impl_runtime_apis.rs
+++ b/substrate/primitives/api/proc-macro/src/impl_runtime_apis.rs
@@ -35,8 +35,7 @@ use syn::{
parse_macro_input, parse_quote,
spanned::Spanned,
visit_mut::{self, VisitMut},
- Attribute, Ident, ImplItem, ItemImpl, ItemMod, ItemUse, Path, Signature, Type, TypePath,
- UseTree,
+ Attribute, Ident, ImplItem, ItemImpl, ItemMod, Path, Signature, Type, TypePath, UseTree,
};
use std::collections::HashMap;
@@ -867,24 +866,6 @@ pub fn impl_runtime_apis_impl(input: proc_macro::TokenStream) -> proc_macro::Tok
.into()
}
-fn parse_path(path: &mut Vec, item: &UseTree) -> Result<()> {
- match &item {
- syn::UseTree::Path(use_path) => {
- path.push(use_path.ident.clone());
- parse_path(path, use_path.tree.as_ref())
- },
- syn::UseTree::Glob(_) => Ok(()),
- syn::UseTree::Name(_) | syn::UseTree::Rename(_) | syn::UseTree::Group(_) => {
- let error = Error::new(
- item.span(),
- "Unsupported syntax used to import api implementaions from an extension module. \
- Try using `pub use ::*` or `use ::*`",
- );
- return Err(error)
- },
- }
-}
-
fn impl_runtime_apis_impl_inner(
api_impls: &mut [ItemImpl],
uses: &[TypePath],