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 #[must_use] for ring buffer functions #561

Merged
merged 2 commits into from
Nov 3, 2021

Conversation

luojia65
Copy link
Contributor

This pull request adds #[must_use] flag on several ring buffer functions that have side-effects.

This lint is in stable Rust now: rust-lang/rust#43302, these changes are noted according to code comment from @whitequark: f65bc8a.

Some test cases and functions are altered due to changes of #[must_use].

This lint is in stable Rust now: rust-lang/rust#43302.
These changes are noted according to code comment from @whitequark.
Some test cases and functions are altered due to changes of #[must_use].
Copy link
Member

@Dirbaio Dirbaio left a comment

Choose a reason for hiding this comment

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

Thank you! Looks great, nice test updates too!

must_use is stable since 2018, this was long overdue haha 🙈

bors r+

@bors
Copy link
Contributor

bors bot commented Nov 3, 2021

Build succeeded:

@bors bors bot merged commit 24fa299 into smoltcp-rs:master Nov 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants