Skip to content
New issue

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

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

Already on GitHub? # to your account

Why is clear_all_inserted private? #207

Open
DavidTheFighter opened this issue Sep 27, 2024 · 2 comments
Open

Why is clear_all_inserted private? #207

DavidTheFighter opened this issue Sep 27, 2024 · 2 comments

Comments

@DavidTheFighter
Copy link

Just started trying out shipyard and according to the guide I should use clear_all_inserted() and friends to clear tracking outside of workloads. In the latest version it seems to be private, why is that? Is there a better way to do this or is that coming down the pipe? Happy to contribute if there's an agreed way to go.

@DavidTheFighter
Copy link
Author

And as usual as soon as I comment/ask for help I find the answer, you need a ViewMut to access those methods. I'll ask an alternative question then, why can I access clear_all_removed() and clear_all_deleted() from View but not the insert/modified variant?

@leudz
Copy link
Owner

leudz commented Sep 27, 2024

You shouldn't be able to access them either. View shouldn't be able to modify anything.
Rust Analyzer lists them as available but it shouldn't. I think it's confused by Deref/DerefMut.
But if they are available or the doc says they are somewhere, let me know.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants