manuelmauro / algonaut

A rusty sdk for Algorand.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

impl `Display` for Address

skylerqpq opened this issue · comments

Is your feature request related to a problem? Please describe.
Not a problem as much as a minor annoyance. The Rust ecosystem tends to like Display impls, and they come with ToString impls.

Describe the solution you'd like
replace the ToString impl of Address with a Display impl.

Describe alternatives you've considered
"not doing that"

Additional context
I'm trying to use a macro from serde_with crate to automatically {de,}serialize an address from/to a string it specifically wants the FromStr and Display impls (TryFrom/Into would work as well), this can be worked around, and isn't really a bug as much as "something I wish existed"

Note that this isn't a breaking change (you still have a ToString impl that is byte-for-byte identical)

I did this change recently in my local copy (also to use serde_with and DisplayFromStr in some API objects). Will upload it soon!