derive_more icon indicating copy to clipboard operation
derive_more copied to clipboard

Derive Display Should infer display provided from the the struct field annotation.

Open da2ce7 opened this issue 1 year ago • 1 comments
trafficstars

// Working

#[derive(Display)]
#[display(fmt = "A")]
struct A;

#[derive(Display)]
struct B {
    a: A,
}
// Not Working

struct A;

#[derive(Display)]
struct B {
    #[display(fmt = "A")]
    a: A,
}

da2ce7 avatar Apr 05 '24 16:04 da2ce7

Did you check this with version 1.0.0-beta.6?

JelteF avatar Apr 06 '24 08:04 JelteF

Okay looking at this again. I don't think we should support this. Because what should happen if the struct has 2 fields? So closing this as not planned.

JelteF avatar Sep 08 '24 10:09 JelteF