Skip to content

Commit 6ba0990

Browse files
Merge pull request #14 from gdetal/reexport_macros
remove dependency to cmd_lib_core
2 parents 3707d59 + 68e00a1 commit 6ba0990

File tree

1 file changed

+17
-6
lines changed

1 file changed

+17
-6
lines changed

src/lib.rs

+17-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,21 @@
1-
use cmd_lib_core;
2-
use cmd_lib_macros;
1+
pub use cmd_lib_core;
2+
pub use cmd_lib_macros;
33

4-
pub use cmd_lib_macros::{
5-
run_cmd,
6-
run_fun,
7-
};
4+
#[macro_export]
5+
macro_rules! run_cmd {
6+
($($cur:tt)*) => {{
7+
use $crate::cmd_lib_core;
8+
$crate::cmd_lib_macros::run_cmd!($($cur)*)
9+
}};
10+
}
11+
12+
#[macro_export]
13+
macro_rules! run_fun {
14+
($($cur:tt)*) => {{
15+
use $crate::cmd_lib_core;
16+
$crate::cmd_lib_macros::run_fun!($($cur)*)
17+
}};
18+
}
819

920
pub use cmd_lib_core::{
1021
run_cmd,

0 commit comments

Comments
 (0)