Refactor all_the_tuples! macros (#1413)

This commit is contained in:
David Pedersen
2022-09-25 15:22:40 +02:00
committed by GitHub
parent 8dd9c8d286
commit bf341fd034
9 changed files with 69 additions and 119 deletions
+1 -25
View File
@@ -74,31 +74,7 @@ macro_rules! impl_from_request {
};
}
impl_from_request!([], T1);
impl_from_request!([T1], T2);
impl_from_request!([T1, T2], T3);
impl_from_request!([T1, T2, T3], T4);
impl_from_request!([T1, T2, T3, T4], T5);
impl_from_request!([T1, T2, T3, T4, T5], T6);
impl_from_request!([T1, T2, T3, T4, T5, T6], T7);
impl_from_request!([T1, T2, T3, T4, T5, T6, T7], T8);
impl_from_request!([T1, T2, T3, T4, T5, T6, T7, T8], T9);
impl_from_request!([T1, T2, T3, T4, T5, T6, T7, T8, T9], T10);
impl_from_request!([T1, T2, T3, T4, T5, T6, T7, T8, T9, T10], T11);
impl_from_request!([T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11], T12);
impl_from_request!([T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12], T13);
impl_from_request!(
[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13],
T14
);
impl_from_request!(
[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14],
T15
);
impl_from_request!(
[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15],
T16
);
all_the_tuples!(impl_from_request);
#[cfg(test)]
mod tests {