Closed hanabi1224 closed 1 week ago
@hanabi1224 do we need another dependency or could we reuse strum
? https://docs.rs/strum/latest/strum/derive.Display.html
do we need another dependency or could we reuse
strum
? https://docs.rs/strum/latest/strum/derive.Display.html
@LesnyRumcajs According to the doc, strum
converts enum variants to strings.
. while displaydoc
also supports structs. Using displaydoc
does not expand our dependency tree, as it's one of the indirect dependencies. Popularity wise, displaydoc
is among top 100 crates(that are available on the Rust playground).
#[derive(displaydoc::Display)]
#[serde(transparent)]
#[displaydoc("{0}")]
pub struct StrictAddress(pub Address);
Summary of changes
Changes introduced in this pull request:
displaydoc
Reference issue to close (if applicable)
Closes
Other information and links
https://crates.io/crates/displaydoc
Change checklist