We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0f3e898 commit c5ce32cCopy full SHA for c5ce32c
crates/starknet-types-core/src/patricia_key.rs
@@ -48,11 +48,19 @@ pub struct PatriciaKeyFromFeltError(Felt);
48
49
impl core::fmt::Display for PatriciaKeyFromFeltError {
50
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
51
- write!(
+ #[cfg(feature = "alloc")]
52
+ return write!(
53
f,
54
"invalid felt value for patricia key. Upper non-inclusinve bound is 2^251 got {:#x}",
55
self.0
- )
56
+ );
57
+
58
+ #[cfg(not(feature = "alloc"))]
59
60
+ f,
61
+ "invalid felt value for patricia key. Upper non-inclusinve bound is 2^251 got {}",
62
+ self.0
63
64
}
65
66
0 commit comments