You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It should be possible to print signed integers (i8...i128). Currently, trying to println!("{}", an_i128); results in an error similar to this
error: Trait has no implementation in context: core::fmt::Display::<core::integer::i128>
--> /Users/m/projects/bibliodao/lordship/src/tests/test_velords.cairo[println_macro][writeln_macro]:3:31
match core::fmt::Display::fmt(__write_macro_arg0__, ref __formatter_for_print_macros__) {
^*^
Error: Failed to compile test artifact, for detailed information go through the logs above
Describe Preferred Solution
Both Debug and Display should be implemented. A sign should be prepended to the value in case it's negative.
Feature Request
Describe the Feature Request
It should be possible to print signed integers (i8...i128). Currently, trying to
println!("{}", an_i128);
results in an error similar to thisDescribe Preferred Solution
Both Debug and Display should be implemented. A sign should be prepended to the value in case it's negative.
Additional Context
Missing this feature also means it's currently not possible to use
assert_eq!
on signed integers.If the feature request is approved, would you be willing to submit a PR?
(Help can be provided if you need assistance submitting a PR)
The text was updated successfully, but these errors were encountered: