Cleanup `Planner::run*` implementations
Places all `impl_run!` macro invocations inside a single `impl` block.
The result is functionally identical, but makes the documentation more
readable.
@@ -202,7 +202,7 @@ impl<C: Clone + Send + 'static> Planner<C> {
}
macro_rules! impl_run {
- ($name:ident [$( $write:ident ),*] [$( $read:ident ),*]) => (impl<C: 'static> Planner<C> {
+ ($name:ident [$( $write:ident ),*] [$( $read:ident ),*]) => (
#[allow(missing_docs, non_snake_case, unused_mut)]
pub fn $name<$($write,)* $($read,)*
F: 'static + Send + FnMut( $(&mut $write,)* $(&$read,)* )
@@ -222,9 +222,10 @@ macro_rules! impl_run {
}
});
}
- })
+ )
}
+impl<C: 'static> Planner<C> {
impl_run!( run0w1r [] [R0] );
impl_run!( run0w2r [] [R0, R1] );
impl_run!( run0w3r [] [R0, R1, R2] );
@@ -240,3 +241,4 @@ impl_run!( run1w7r [W0] [R0, R1, R2, R3, R5, R6, R7] );
impl_run!( run2w0r [W0, W1] [] );
impl_run!( run2w1r [W0, W1] [R0] );
impl_run!( run2w2r [W0, W1] [R0, R1] );
+}
