|
@@ -1,4 +1,4 @@
|
|
|
-use crate::{Walkable,Walker};
|
|
|
+use crate::{Walkable, Walker};
|
|
|
|
|
|
impl Walkable for u8 {
|
|
|
fn walk_with<W: Walker>(walker: &mut W) {
|
|
@@ -68,7 +68,9 @@ impl Walkable for () {
|
|
|
|
|
|
impl<T0: Walkable> Walkable for (T0,) {
|
|
|
fn walk_with<W: Walker>(walker: &mut W) {
|
|
|
- struct Tuple<T> { pd: core::marker::PhantomData<T> }
|
|
|
+ struct Tuple<T> {
|
|
|
+ pd: core::marker::PhantomData<T>,
|
|
|
+ }
|
|
|
impl<T0: Walkable> Walkable for Tuple<(T0,)> {
|
|
|
fn walk_with<W: Walker>(walker: &mut W) {
|
|
|
walker.visit_field::<T0>("0");
|
|
@@ -78,37 +80,43 @@ impl<T0: Walkable> Walkable for (T0,) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-impl<T0: Walkable, T1: Walkable> Walkable for (T0,T1) {
|
|
|
+impl<T0: Walkable, T1: Walkable> Walkable for (T0, T1) {
|
|
|
fn walk_with<W: Walker>(walker: &mut W) {
|
|
|
- struct Tuple<T> { pd: core::marker::PhantomData<T> }
|
|
|
- impl<T0: Walkable, T1: Walkable> Walkable for Tuple<(T0,T1)> {
|
|
|
+ struct Tuple<T> {
|
|
|
+ pd: core::marker::PhantomData<T>,
|
|
|
+ }
|
|
|
+ impl<T0: Walkable, T1: Walkable> Walkable for Tuple<(T0, T1)> {
|
|
|
fn walk_with<W: Walker>(walker: &mut W) {
|
|
|
walker.visit_field::<T0>("0");
|
|
|
walker.visit_field::<T1>("1");
|
|
|
}
|
|
|
}
|
|
|
- walker.visit_tuple::<Tuple<(T0,T1)>>();
|
|
|
+ walker.visit_tuple::<Tuple<(T0, T1)>>();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-impl<T0: Walkable, T1: Walkable, T2: Walkable> Walkable for (T0,T1,T2) {
|
|
|
+impl<T0: Walkable, T1: Walkable, T2: Walkable> Walkable for (T0, T1, T2) {
|
|
|
fn walk_with<W: Walker>(walker: &mut W) {
|
|
|
- struct Tuple<T> { pd: core::marker::PhantomData<T> }
|
|
|
- impl<T0: Walkable, T1: Walkable, T2: Walkable> Walkable for Tuple<(T0,T1,T2)> {
|
|
|
+ struct Tuple<T> {
|
|
|
+ pd: core::marker::PhantomData<T>,
|
|
|
+ }
|
|
|
+ impl<T0: Walkable, T1: Walkable, T2: Walkable> Walkable for Tuple<(T0, T1, T2)> {
|
|
|
fn walk_with<W: Walker>(walker: &mut W) {
|
|
|
walker.visit_field::<T0>("0");
|
|
|
walker.visit_field::<T1>("1");
|
|
|
walker.visit_field::<T2>("2");
|
|
|
}
|
|
|
}
|
|
|
- walker.visit_tuple::<Tuple<(T0,T1,T2)>>();
|
|
|
+ walker.visit_tuple::<Tuple<(T0, T1, T2)>>();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-impl<T0: Walkable, T1: Walkable, T2: Walkable, T3: Walkable> Walkable for (T0,T1,T2,T3) {
|
|
|
+impl<T0: Walkable, T1: Walkable, T2: Walkable, T3: Walkable> Walkable for (T0, T1, T2, T3) {
|
|
|
fn walk_with<W: Walker>(walker: &mut W) {
|
|
|
- struct Tuple<T> { pd: core::marker::PhantomData<T> }
|
|
|
- impl<T0: Walkable, T1: Walkable, T2: Walkable, T3: Walkable> Walkable for Tuple<(T0,T1,T2,T3)> {
|
|
|
+ struct Tuple<T> {
|
|
|
+ pd: core::marker::PhantomData<T>,
|
|
|
+ }
|
|
|
+ impl<T0: Walkable, T1: Walkable, T2: Walkable, T3: Walkable> Walkable for Tuple<(T0, T1, T2, T3)> {
|
|
|
fn walk_with<W: Walker>(walker: &mut W) {
|
|
|
walker.visit_field::<T0>("0");
|
|
|
walker.visit_field::<T1>("1");
|
|
@@ -116,6 +124,6 @@ impl<T0: Walkable, T1: Walkable, T2: Walkable, T3: Walkable> Walkable for (T0,T1
|
|
|
walker.visit_field::<T3>("3");
|
|
|
}
|
|
|
}
|
|
|
- walker.visit_tuple::<Tuple<(T0,T1,T2,T3)>>();
|
|
|
+ walker.visit_tuple::<Tuple<(T0, T1, T2, T3)>>();
|
|
|
}
|
|
|
}
|