SpecificProtagonist

Results 14 comments of SpecificProtagonist

Found another instance of the suggested fix not compiling ([playground link](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=33f039673fd0deba428eb383b5e3aa37)): ```rust let foo = &Some(()); let Some(_) = foo else { return None }; ``` The fix (`let _...

What's the reason for needing both `Mut` & `ResMut`? Both are exclusive refs + change tracking, the difference between them is just that `ResMut` is a system param. There's also...

The issue proposed two alternatives, the former being adding a new method, which I was curious about. I agree with the second one of changing the existing functions :)

Nice. What's the use case for fetching the same resource multiple times?

I don't think we need to, I was just curious. Not providing for it would make the code shorter though. Edit: Maybe we should. If fetching the same res twice...

Since the check for conflicting accesses doesn't depend on the world, we'd ideally perform it at compile time (and throw compile errors). Unfortunately [`const_type_id` isn't stable yet](https://github.com/rust-lang/rust/issues/77125), but we should...

> The original issue suggested to change the World::get_resource & World::get_resource_mut methods. I think this approach (as implemented in this PR) is preferable, because it lets the caller specifically request...

An alternate approach is to follow #2948 and allow both name- and index-based paths (as in #5808) instead of allowing only one and switching based on a setting.

Could you add "Compatibility with FixedUpdate"?

Thanks. Looks like bevy_pbr isn't correct either. I'm not sure, might need to be crate::PbrPlugin, but I can't check right now.