derive_more icon indicating copy to clipboard operation
derive_more copied to clipboard

Feature idea: `PartialEq` and `PartialOrd` for the wrapped type

Open CGMossa opened this issue 3 years ago • 4 comments

I'm finding myself needing to wrap a type "quickly", but then I don't want to have any specific restrictions on the inner-type, other than being wrapped.

PartialOrd and PartialEq where Rhs = InnerType is a small ergonomic advantage if at all possible?

I see that #51 was shortly dismissed, but maybe this is a good time to maybe revisit this.

I have also been thinking if this is possible to add through a trait, but I think this is less explicit then what can be done using a derive-macro. Also the object-safety issue comes up if I want to do that..

CGMossa avatar Jun 09 '21 22:06 CGMossa

Maybe it's indeed time to revisit, what do you think @tyranron?

JelteF avatar Dec 21 '23 23:12 JelteF

@JelteF I do actually think that all the standard derives should be represented in derive_more too, just because standard derives are very stupid regarding bounding type parameters. So, it's something definitely to have after going 1.0.

tyranron avatar Dec 22 '23 12:12 tyranron