mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-25 02:25:51 +00:00
better debugging for accountid32 in debug build (#2990)
This commit is contained in:
@@ -593,14 +593,16 @@ impl std::fmt::Display for AccountId32 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl sp_std::fmt::Debug for AccountId32 {
|
impl sp_std::fmt::Debug for AccountId32 {
|
||||||
#[cfg(feature = "std")]
|
|
||||||
fn fmt(&self, f: &mut sp_std::fmt::Formatter) -> sp_std::fmt::Result {
|
fn fmt(&self, f: &mut sp_std::fmt::Formatter) -> sp_std::fmt::Result {
|
||||||
let s = self.to_ss58check();
|
#[cfg(feature = "serde")]
|
||||||
write!(f, "{} ({}...)", crate::hexdisplay::HexDisplay::from(&self.0), &s[0..8])
|
{
|
||||||
}
|
let s = self.to_ss58check();
|
||||||
|
write!(f, "{} ({}...)", crate::hexdisplay::HexDisplay::from(&self.0), &s[0..8])?;
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(not(feature = "serde"))]
|
||||||
|
write!(f, "{}", crate::hexdisplay::HexDisplay::from(&self.0))?;
|
||||||
|
|
||||||
#[cfg(not(feature = "std"))]
|
|
||||||
fn fmt(&self, _: &mut sp_std::fmt::Formatter) -> sp_std::fmt::Result {
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user