derive_more
derive_more copied to clipboard
Derive Display Should infer display provided from the the struct field annotation.
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,
}
Did you check this with version 1.0.0-beta.6?
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.