From fdce20c70e0e12f1e9011f6d253a47421014131b 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) --- frame/support/src/storage/bounded_vec.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/frame/support/src/storage/bounded_vec.rs b/frame/support/src/storage/bounded_vec.rs index 44eaab905423b..f353127969c5b 100644 --- a/frame/support/src/storage/bounded_vec.rs +++ b/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() } }