Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type inference of Storage broken on Action::new_unsync #3328

Open
gbj opened this issue Dec 6, 2024 · 1 comment
Open

Type inference of Storage broken on Action::new_unsync #3328

gbj opened this issue Dec 6, 2024 · 1 comment
Milestone

Comments

@gbj
Copy link
Collaborator

gbj commented Dec 6, 2024

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
Copy link
Contributor

bicarlsen commented Dec 8, 2024

This also seems to be occurring for Signal when using impl<T> From<ReadSignal<T>> for Signal<T>.

@gbj gbj added this to the 0.8 milestone Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants