From b890a28ca3e4ffbdbe07882bf2d159138eb45899 Mon Sep 17 00:00:00 2001 From: Jay Pavlina Date: Sat, 2 Oct 2021 03:11:37 -0500 Subject: [PATCH] Implement core::fmt::Debug for BoundedVec (#9914) --- substrate/frame/support/src/storage/bounded_vec.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/substrate/frame/support/src/storage/bounded_vec.rs b/substrate/frame/support/src/storage/bounded_vec.rs index 44eaab9054..f353127969 100644 --- a/substrate/frame/support/src/storage/bounded_vec.rs +++ b/substrate/frame/support/src/storage/bounded_vec.rs @@ -200,13 +200,12 @@ impl Default for BoundedVec { } } -#[cfg(feature = "std")] -impl std::fmt::Debug for BoundedVec +impl sp_std::fmt::Debug for BoundedVec where - T: std::fmt::Debug, + T: sp_std::fmt::Debug, S: Get, { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + fn fmt(&self, f: &mut sp_std::fmt::Formatter<'_>) -> sp_std::fmt::Result { f.debug_tuple("BoundedVec").field(&self.0).field(&Self::bound()).finish() } }