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

Add lint: panicking ECS APIs #85

Closed
alice-i-cecile opened this issue Sep 17, 2024 · 1 comment
Closed

Add lint: panicking ECS APIs #85

alice-i-cecile opened this issue Sep 17, 2024 · 1 comment

Comments

@alice-i-cecile
Copy link
Member

Calling .single, .single_mut, .resource, .resource_mut and so on can introduce surprising crashes to your production game.

We should pair this with a recommendation to use equivalent lints around unwrap and expect in clippy, so coders don't just change .single() to .get_single().unwrap().

We probably want to split this into two lints, one for query data and the other for resources.

@BD103
Copy link
Member

BD103 commented Sep 17, 2024

Thank you! Marking this as a duplicate of #58 and copying over your comment there.

@BD103 BD103 closed this as not planned Won't fix, can't repro, duplicate, stale Sep 17, 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