Access Display and Formatter with fmt:: like in other places
This commit is contained in:
parent
20f1543f79
commit
b9d5200448
|
@ -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];
|
||||||
|
|
Loading…
Reference in New Issue