1- #[ macro_export]
21macro_rules! impl_for {
32 ( $trait: ident, $typ_: ty, $block: tt) => {
43 impl $trait for $typ_ $block
54 } ;
65}
76
8- #[ macro_export]
97macro_rules! impl_for_ints {
108 ( $trait: ident, $block: tt) => {
119 impl_for!( $trait, i8 , $block) ;
@@ -21,23 +19,20 @@ macro_rules! impl_for_ints {
2119 } ;
2220}
2321
24- #[ macro_export]
2522macro_rules! impl_for_floats {
2623 ( $trait: ident, $block: tt) => {
2724 impl_for!( $trait, f32 , $block) ;
2825 impl_for!( $trait, f64 , $block) ;
2926 } ;
3027}
3128
32- #[ macro_export]
3329macro_rules! impl_for_numerics {
3430 ( $trait: ident, $block: tt) => {
3531 impl_for_ints!( $trait, $block) ;
3632 impl_for_floats!( $trait, $block) ;
3733 } ;
3834}
3935
40- #[ macro_export]
4136macro_rules! impl_for_time_types {
4237 ( $trait: ident, $block: tt) => {
4338 impl_for!( $trait, core:: time:: Duration , $block) ;
@@ -48,15 +43,13 @@ macro_rules! impl_for_time_types {
4843 } ;
4944}
5045
51- #[ macro_export]
5246macro_rules! impl_for_ints_and_duration {
5347 ( $trait: ident, $block: tt) => {
5448 impl_for_ints!( $trait, $block) ;
5549 impl_for!( $trait, core:: time:: Duration , $block) ;
5650 } ;
5751}
5852
59- #[ macro_export]
6053macro_rules! impl_for_all {
6154 ( $trait: ident, $block: tt) => {
6255 impl_for_numerics!( $trait, $block) ;
0 commit comments