Remove pub in macros (#1027)

* use :vis in macro_rules!

* use :vis in meta
This commit is contained in:
guanqun
2018-10-27 18:15:15 +08:00
committed by Bastian Köcher
parent 55e53a9898
commit c0f7021427
2 changed files with 110 additions and 908 deletions
@@ -196,13 +196,9 @@ impl<D: NativeExecutionDispatch> CodeExecutor<Blake2Hasher> for NativeExecutor<D
#[macro_export]
macro_rules! native_executor_instance {
(pub $name:ident, $dispatcher:path, $version:path, $code:expr) => {
pub struct $name;
native_executor_instance!(IMPL $name, $dispatcher, $version, $code);
};
($name:ident, $dispatcher:path, $version:path, $code:expr) => {
( $pub:vis $name:ident, $dispatcher:path, $version:path, $code:expr) => {
/// A unit struct which implements `NativeExecutionDispatch` feeding in the hard-coded runtime.
struct $name;
$pub struct $name;
native_executor_instance!(IMPL $name, $dispatcher, $version, $code);
};
(IMPL $name:ident, $dispatcher:path, $version:path, $code:expr) => {