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

Example TODOS does not compile when build from tutorial #607

Open
Maikel1963 opened this issue Jun 27, 2024 · 1 comment
Open

Example TODOS does not compile when build from tutorial #607

Maikel1963 opened this issue Jun 27, 2024 · 1 comment
Labels
bug Something isn't working documentation Improvements or additions to documentation

Comments

@Maikel1963
Copy link

Problem
I am trying to follow the tutorial by writing the example step by step and using

ribir = {git = "https://github.com/RibirX/Ribir.git", features = ["material", "widgets"]}

in cargo.toml
Coming to the point where function task_lists is introduced with emphasize on

Did you notice the line about state splitting?

let task = this.split_writer(
    move |todos| todos.get_task(id).unwrap(),
    move |todos| todos.get_task_mut(id).unwrap(),
);

I get the error message that split_writer should have only one argument.

How do have to alter the function call to get it right?

Environment:

  • Ribir version: newest? s.a.
  • Rust version: 1.79 stable
  • OS, if relevant (don't know):] win 10 H22
@Maikel1963 Maikel1963 added the bug Something isn't working label Jun 27, 2024
@M-Adoo M-Adoo added the documentation Improvements or additions to documentation label Jun 27, 2024
@M-Adoo
Copy link
Collaborator

M-Adoo commented Jun 27, 2024

Sorry, The documentation is currently outdated. I plan to update it soon. In the meantime, here's the correct usage:

let task = this.split_writer(|todos| PartData::from_ref_mut(todos.get_task_mut(id).unwrap()));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants