Restructure macro-related exports into private mods for frame (#14375)

* minor refactor

* Update frame/election-provider-support/src/lib.rs

* Update frame/election-provider-support/solution-type/src/lib.rs

Co-authored-by: Bastian Köcher <git@kchr.de>

* ".git/.scripts/commands/fmt/fmt.sh"

---------

Co-authored-by: Bastian Köcher <git@kchr.de>
Co-authored-by: command-bot <>
This commit is contained in:
Guillaume Yu Thiolliere
2023-06-14 21:44:01 +09:00
committed by GitHub
parent b78473d28a
commit 7db4d74c43
8 changed files with 94 additions and 102 deletions
-5
View File
@@ -15,11 +15,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#[doc(hidden)]
pub use crate::sp_runtime::traits::{Block as BlockT, Extrinsic};
#[doc(hidden)]
pub use crate::sp_std::vec::Vec;
pub use sp_inherents::{
CheckInherentsResult, InherentData, InherentIdentifier, IsFatalError, MakeFatalError,
};
+2 -10
View File
@@ -96,15 +96,6 @@ impl<T> InstanceFilter<T> for () {
}
}
/// Re-expected for the macro.
#[doc(hidden)]
pub use sp_std::{
boxed::Box,
cell::RefCell,
mem::{swap, take},
vec::Vec,
};
#[macro_export]
macro_rules! impl_filter_stack {
($target:ty, $base:ty, $call:ty, $module:ident) => {
@@ -112,7 +103,8 @@ macro_rules! impl_filter_stack {
mod $module {
#[allow(unused_imports)]
use super::*;
use $crate::traits::filter::{swap, take, RefCell, Vec, Box, Contains, FilterStack};
use $crate::sp_std::{boxed::Box, cell::RefCell, mem::{swap, take}, vec::Vec};
use $crate::traits::filter::{Contains, FilterStack};
thread_local! {
static FILTER: RefCell<Vec<Box<dyn Fn(&$call) -> bool + 'static>>> = RefCell::new(Vec::new());