Diffstat (limited to 'tests/demo.rs')
| -rw-r--r-- | tests/demo.rs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/demo.rs b/tests/demo.rs index 900ba42..6875f89 100644 --- a/tests/demo.rs +++ b/tests/demo.rs @@ -59,8 +59,8 @@ impl<'ctx> Builder<'ctx> for StringBuilder { } fn accepts(id: TypeId) -> bool { - id == TypeId::of::<uniserde::protocols::sequence::Sequence>() || - id == TypeId::of::<uniserde::protocols::bool::Bool>() + id == TypeId::of::<uniserde::protocols::sequence::Sequence>() + || id == TypeId::of::<uniserde::protocols::bool::Bool>() } } @@ -69,11 +69,14 @@ implementer! { } impl<'ctx> uniserde::protocols::sequence::Object<'ctx> for StringBuilder { - fn visit(&mut self, accessor: &mut dyn sequence::Accessor<'ctx>) -> uniserde::protocols::ControlFlow { + fn visit( + &mut self, + accessor: &mut dyn sequence::Accessor<'ctx>, + ) -> uniserde::protocols::ControlFlow { self.0.push('['); loop { if accessor.next(self) != uniserde::protocols::sequence::ControlFlow::Continue { - break + break; } self.0.push_str(", "); } |