Access Display and Formatter with fmt:: like in other places

This commit is contained in:
Riccardo Casatta 2021-03-22 13:42:32 +01:00
parent 20f1543f79
commit b9d5200448
No known key found for this signature in database
GPG Key ID: FD986A969E450397
1 changed files with 3 additions and 3 deletions

View File

@ -36,7 +36,7 @@
//! let address = Address::p2pkh(&public_key, Network::Bitcoin); //! let address = Address::p2pkh(&public_key, Network::Bitcoin);
//! ``` //! ```
use std::fmt::{self, Display, Formatter}; use std::fmt;
use std::str::FromStr; use std::str::FromStr;
use std::error; use std::error;
@ -354,8 +354,8 @@ impl Address {
} }
} }
impl Display for Address { impl fmt::Display for Address {
fn fmt(&self, fmt: &mut Formatter) -> fmt::Result { fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
match self.payload { match self.payload {
Payload::PubkeyHash(ref hash) => { Payload::PubkeyHash(ref hash) => {
let mut prefixed = [0; 21]; let mut prefixed = [0; 21];