Skip to content

Commit 0a2a968

Browse files
committed
bounded-collections: Address review comments
1 parent 614f683 commit 0a2a968

File tree

1 file changed

+2
-16
lines changed

1 file changed

+2
-16
lines changed

bounded-collections/src/const_int.rs

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -62,16 +62,9 @@ impl<T: ConstBounded<i128>, const N: i128> CheckOverflowI128<T, N> {
6262
#[derive(Default, Clone)]
6363
pub struct ConstUint<const N: u128>;
6464

65-
#[cfg(feature = "std")]
66-
impl<const N: u128> std::fmt::Debug for ConstUint<N> {
67-
fn fmt(&self, fmt: &mut std::fmt::Formatter) -> std::fmt::Result {
68-
fmt.write_str(&format!("{}<{}>", stringify!(ConstUint), N))
69-
}
70-
}
71-
#[cfg(not(feature = "std"))]
7265
impl<const N: u128> core::fmt::Debug for ConstUint<N> {
7366
fn fmt(&self, fmt: &mut core::fmt::Formatter) -> core::fmt::Result {
74-
fmt.write_str("<wasm:stripped>")
67+
fmt.write_str(&alloc::format!("ConstUint<{}>", N))
7568
}
7669
}
7770

@@ -86,16 +79,9 @@ impl<const N: u128> TypedGet for ConstUint<N> {
8679
#[derive(Default, Clone)]
8780
pub struct ConstInt<const N: i128>;
8881

89-
#[cfg(feature = "std")]
90-
impl<const N: i128> std::fmt::Debug for ConstInt<N> {
91-
fn fmt(&self, fmt: &mut std::fmt::Formatter) -> std::fmt::Result {
92-
fmt.write_str(&format!("{}<{}>", stringify!(ConstInt), N))
93-
}
94-
}
95-
#[cfg(not(feature = "std"))]
9682
impl<const N: i128> core::fmt::Debug for ConstInt<N> {
9783
fn fmt(&self, fmt: &mut core::fmt::Formatter) -> core::fmt::Result {
98-
fmt.write_str("<wasm:stripped>")
84+
fmt.write_str(&alloc::format!("ConstInt<{}>", N))
9985
}
10086
}
10187

0 commit comments

Comments
 (0)