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 functions without side-effects #23

Merged
merged 1 commit into from
Jan 28, 2025

Conversation

WhyNotHugo
Copy link
Contributor

Add #[must_use] to all functions that return a value without any side effect. This results in user code getting a lint if the accidentally call one of these functions but don't use the return value in any way.

Add #[must_use] to all functions that return a value without any side
effect. This results in user code getting a lint if the accidentally
call one of these functions but don't use the return value in any way.
@WhyNotHugo
Copy link
Contributor Author

v2: missed a few

Copy link
Owner

@MaxVerevkin MaxVerevkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, lgtm!

@MaxVerevkin MaxVerevkin merged commit 342d127 into MaxVerevkin:main Jan 28, 2025
5 checks passed
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

Successfully merging this pull request may close these issues.

2 participants