derive_deref icon indicating copy to clipboard operation
derive_deref copied to clipboard

Support multiple fields: deref_target attribute

Open Ploppz opened this issue 6 years ago • 6 comments
trafficstars

Use deref_target when there is more than one field to chose from (excluding any PhantomData, as before).

#[derive(Deref)]
struct StringWrapper {
    additional_data: i32,
    more_data: i32,
    #[deref_target]
    inner: String,
};

And update all dependencies to latest.

Ploppz avatar Oct 14 '19 21:10 Ploppz

I think I addressed all your concerns. What do you think now?

Ploppz avatar Oct 21 '19 10:10 Ploppz

@sgrif @Eijebong would one of you have time to take a look at this? Thank you

azriel91 avatar Jan 07 '20 18:01 azriel91

This is great! I often could use this!

Ten0 avatar Feb 08 '20 19:02 Ten0

@sgrif @Eijebong would one of you have time to take a look at this? Thank you

azriel91 avatar Apr 23 '20 08:04 azriel91

Any chance this could get merged?

(Btw this conflicts)

Ten0 avatar Oct 28 '21 00:10 Ten0

Fixed the conflicts by rebasing.

Ploppz avatar Nov 01 '21 13:11 Ploppz