Type inference of `Storage` broken on `Action::new_unsync`
gbj opened this issue · comments
Greg Johnston commented
Action::new_unsync(move |()| async move {
todo!();
});
94 | let t = Action::new_unsync(move |()| async move {
| _________^___-
95 | | todo!();
96 | | });
| |______- type must be known at this point
|
= note: multiple `impl`s satisfying `_: leptos::prelude::Storage<ArcAction<(), ()>>` found in the `reactive_graph` crate:
- impl<T> leptos::prelude::Storage<T> for LocalStorage
where T: 'static;
- impl<T> leptos::prelude::Storage<T> for SyncStorage
where T: std::marker::Send, T: std::marker::Sync, T: 'static;
note: required by a bound in `leptos::prelude::Action::<I, O, S>::new_unsync`
--> reactive_graph-0.1.0\src\actions\action.rs:966:8
|
966 | S: Storage<ArcAction<I, O>>,
| ^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Action::<I, O, S>::new_unsync`
...
973 | pub fn new_unsync<F, Fu>(action_fn: F) -> Self
| ---------- required by a bound in this associated function
```
bicarlsen commented
This also seems to be occurring for Signal
when using impl<T> From<ReadSignal<T>> for Signal<T>
.