Fixed impl_transactional_tuple_trees macro to generate Transactional for (&Tree,), to avoid single tree special case with generated transaction code
@@ -539,7 +539,10 @@ impl<E> Transactional<E> for [&Tree] {
}
macro_rules! repeat_type {
- ($t:ty, ($($literals:literal),*)) => {
+ ($t:ty, ($literal:literal)) => {
+ ($t,)
+ };
+ ($t:ty, ($($literals:literal),+)) => {
repeat_type!(IMPL $t, (), ($($literals),*))
};
(IMPL $t:ty, (), ($first:literal, $($rest:literal),*)) => {
@@ -572,13 +575,14 @@ macro_rules! impl_transactional_tuple_trees {
(
$(
overlay.inner[$indices].clone()
- ),+
+ ),+,
)
}
}
};
}
+impl_transactional_tuple_trees!(0);
impl_transactional_tuple_trees!(0, 1);
impl_transactional_tuple_trees!(0, 1, 2);
impl_transactional_tuple_trees!(0, 1, 2, 3);
