derive_more
derive_more copied to clipboard
Support thiserror like formatting for Display derive
I would love to be able to do this:
#[derive(Display)]
#[display("{major}.{minor}.{patch}")]
pub struct Version {
major: usize,
minor: usize,
patch: usize,
}
instead of
#[derive(Display)]
#[display(fmt = "{}.{}.{}", major, minor, patch)]
pub struct Version {
major: usize,
minor: usize,
patch: usize,
}
thiserror
allows the first example, so it should be possible to be implemented.
I would definitly like to have this feature, feel free to open a PR implementing it.
@JelteF I believe this has been fully covered by #182