Properly implement Debug on bounded types (#11659)

This commit is contained in:
Keith Yeung
2022-06-14 04:39:33 +02:00
committed by GitHub
parent ad1d171601
commit dbe1881702
4 changed files with 10 additions and 13 deletions
@@ -168,13 +168,12 @@ impl<T, S> Default for WeakBoundedVec<T, S> {
}
}
#[cfg(feature = "std")]
impl<T, S> std::fmt::Debug for WeakBoundedVec<T, S>
impl<T, S> sp_std::fmt::Debug for WeakBoundedVec<T, S>
where
T: std::fmt::Debug,
Vec<T>: sp_std::fmt::Debug,
S: Get<u32>,
{
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("WeakBoundedVec").field(&self.0).field(&Self::bound()).finish()
}
}