shipyard icon indicating copy to clipboard operation
shipyard copied to clipboard

Why is `clear_all_inserted` private?

Open DavidTheFighter opened this issue 1 year ago • 2 comments

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 avatar Sep 27 '24 04:09 DavidTheFighter

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?

DavidTheFighter avatar Sep 27 '24 04:09 DavidTheFighter

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.

leudz avatar Sep 27 '24 08:09 leudz