modular-bitfield icon indicating copy to clipboard operation
modular-bitfield copied to clipboard

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

Open ketsuban opened this issue 3 years ago • 2 comments

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.

ketsuban avatar Dec 23 '21 17:12 ketsuban

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.

vadixidav avatar Jan 17 '22 00:01 vadixidav

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

ketsuban avatar Jan 17 '22 00:01 ketsuban