tuple_into/lib.rs
1use seq_macro::seq;
2
3pub trait TupleInto<T> {
4 fn tuple_into(self) -> T;
5}
6
7seq!(N in 0..=127 {
8 #(
9 seq!(M in 0..=N {
10 impl <#(Out~M, )* #(In~M: Into<Out~M>, )*> TupleInto<(#(Out~M, )*)> for (#(In~M, )*) {
11 fn tuple_into(self) -> (#(Out~M, )*) {
12 (#(self.M.into(), )*)
13 }
14 }
15 });
16 )*
17});
18