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

Recommend Single system param in panicking_query_methods lint #136

Open
BD103 opened this issue Oct 12, 2024 · 1 comment
Open

Recommend Single system param in panicking_query_methods lint #136

BD103 opened this issue Oct 12, 2024 · 1 comment
Labels
A-Linter Related to the linter and custom lints C-Usability An improvement that makes the API more pleasant

Comments

@BD103
Copy link
Member

BD103 commented Oct 12, 2024

See bevyengine/bevy#15866 for more context! While Single is currently unstable, it would be nice to add a note when query.single() or query.single_mut() is used.

@BD103 BD103 added A-Linter Related to the linter and custom lints C-Usability An improvement that makes the API more pleasant labels Oct 12, 2024
@BD103
Copy link
Member Author

BD103 commented Oct 12, 2024

Note that PanickingType::alternatives() will likely need to be modified to return an optional helpful message. There may be other ways of doing this, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Linter Related to the linter and custom lints C-Usability An improvement that makes the API more pleasant
Projects
None yet
Development

No branches or pull requests

1 participant