derive_more icon indicating copy to clipboard operation
derive_more copied to clipboard

Add Derive for `into_inner` function

Open vultix opened this issue 4 years ago • 3 comments
trafficstars

While there's no true IntoInner trait, it's a super common pattern for newtypes to provide an into_inner function. It'd be great if this crate could make it easy to add that function.

vultix avatar Aug 05 '21 20:08 vultix

Seconded. The Into trait often requires specifying the type through some awkward syntax or temp value, so having an into_inner with a definite type would be great.

vdods avatar Jun 18 '22 19:06 vdods

Literally waiting for this. It will eliminate lot of code while passing sql params as tuple. We can write generic code for all tables.

ekanna avatar Jun 24 '22 14:06 ekanna

Sounds reasonable. I think it would fit well with the rest of our derives for static methods. PRs are welcome.

JelteF avatar Dec 21 '23 23:12 JelteF