derive_more icon indicating copy to clipboard operation
derive_more copied to clipboard

display: enum match arms: use 'Self' (to fix incompatibility with `#![deny(clippy::use_self)]`

Open phip1611 opened this issue 2 years ago • 6 comments

This PR makes the generated code compatible with a global setting of #![deny(clippy::use_self)] by using Self::Variant instead of EnumName::Variant.

phip1611 avatar Jun 09 '22 21:06 phip1611

@phip1611 well, this change doesn't survive the MSRV check.

@JelteF are we OK to bump up MSRV to at least 1.51 (last 10 versions)? Or do you see some sense to keep MSRV such outdated? Additionally, I'd like to place #[automatically_derived] attribute on the every generated code, so the style linters may omit the generated code (doesn't solve this issue due to the Clippy bug, however).

tyranron avatar Jun 10 '22 08:06 tyranron

btw, I fixed the latest (unrelated) clippy error as well.

phip1611 avatar Jun 10 '22 08:06 phip1611

I am not opposed to bumping MSRV to something less ancient, but I would like to do that only when increasing the major version of the library. Marking this lib as 1.0 is way overdue anyway.

I cleaned up the 1.0.0 milestone to only contain things that require breaking changes, it turned out that was only a single thing.

JelteF avatar Jun 11 '22 08:06 JelteF

@JelteF in case we don't want to do 1.x releases yet, we always may release just 0.100.x one, containing the necessary breaking changes.

tyranron avatar Jun 13 '22 08:06 tyranron

any update here? @tyranron @JelteF

phip1611 avatar Jul 31 '22 15:07 phip1611

@phip1611 bumping MSRV is OK, as we're going to release 1.0.0.

tyranron avatar Aug 23 '22 16:08 tyranron

I rebased the MR onto the latest master. Can you approve the CI, please?

phip1611 avatar Sep 25 '22 08:09 phip1611