Diffstat (limited to 'tests/hook.rs')
-rw-r--r--tests/hook.rs14
1 files changed, 10 insertions, 4 deletions
diff --git a/tests/hook.rs b/tests/hook.rs
index ebdf728..1cb633a 100644
--- a/tests/hook.rs
+++ b/tests/hook.rs
@@ -2,10 +2,11 @@ use std::{marker::PhantomData, ops::ControlFlow, pin::Pin, thread::yield_now, ti
use treaty::{
any::{any_trait, static_wrapper::OwnedStatic, AnyTrait, IndirectLtAny, LtTypeId},
+ builders::core::option::IgnoreMissing,
effect::{BlockOn, Blocking, Effect, Future, Spin},
protocol::visitor::value::Value,
protocol::Visitor,
- transform, Build, Builder, Walk, Walker, builders::core::option::IgnoreMissing, WalkerTypes,
+ transform, Build, Builder, Walk, Walker, WalkerTypes,
};
#[test]
@@ -17,7 +18,10 @@ fn demo() {
// let x = build_with::<<bool as Build<_>>::Builder, _>(hook).unwrap();
// dbg!(x);
// let x = Spin::block_on(transform::<<Option<bool> as Build>::Builder<_>, _, Blocking>(IgnoreMissing::No, hook));
- let x = Spin::block_on(transform::<<bool as Build>::Builder<_>, _, Blocking>((), hook));
+ let x = Spin::block_on(transform::<<bool as Build>::Builder<_>, _, Blocking>(
+ (),
+ hook,
+ ));
dbg!(x);
todo!();
}
@@ -110,12 +114,14 @@ impl<'b, 'ctx: 'b, E: Effect<'ctx>> AnyTrait<'ctx> for VisitorHook<'b, 'ctx, E>
id => {
// println!("fallback: {:?}", id);
self.inner.upcast_to_id_mut(id)
- },
+ }
}
}
}
-impl<'a, 'b, 'ctx: 'a + 'b, E: Effect<'ctx>> Value<'a, 'ctx, OwnedStatic<bool>, E> for VisitorHook<'b, 'ctx, E> {
+impl<'a, 'b, 'ctx: 'a + 'b, E: Effect<'ctx>> Value<'a, 'ctx, OwnedStatic<bool>, E>
+ for VisitorHook<'b, 'ctx, E>
+{
#[inline]
fn visit(
&'a mut self,