Robbepop / modular-bitfield

Macro to generate bitfields for structs that allow for modular use of enums.
Apache License 2.0
160 stars 42 forks source link

`with_*` methods should have `#[must_use]` annotation #79

Open ketsuban opened 2 years ago

ketsuban commented 2 years ago

I started getting a new Clippy lint, return_self_not_must_use, when I updated my nightly compiler. This appears to be a simple fix of adding #[must_use] to the with_* methods created by this macro.

vadixidav commented 2 years ago

This appears to have hit beta now as well. This should be dealt with before the next stable release, when this clippy lint will be stabilized.

ketsuban commented 2 years ago

As a workaround (?) you can annotate the struct itself with #[must_use].