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 #[must_use] to all pub functions #47

Open
MarcoIeni opened this issue Dec 8, 2020 · 1 comment
Open

add #[must_use] to all pub functions #47

MarcoIeni opened this issue Dec 8, 2020 · 1 comment
Labels
C-enhancement Category: a PR with an enhancement or an issue tracking an accepted enhancement E-easy An easy issue: a good way to start contributing

Comments

@MarcoIeni
Copy link

MarcoIeni commented Dec 8, 2020

docs here.

Calling config_dir() and all the other public functions without reading the return values makes no sense (because they have no side effects) and is a user error for sure.

By adding this macro, the user will get a warning if it calls these functions without reading the return value.

Example here

@tesuji
Copy link
Contributor

tesuji commented Jan 5, 2021

This's maybe helpful.
You're welcome to create a PR to fix this issue.

@tesuji tesuji added C-enhancement Category: a PR with an enhancement or an issue tracking an accepted enhancement E-easy An easy issue: a good way to start contributing labels Jan 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: a PR with an enhancement or an issue tracking an accepted enhancement E-easy An easy issue: a good way to start contributing
Projects
None yet
Development

No branches or pull requests

2 participants