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
I often embed uint256.Int types directly into a struct to avoid the overhead of memory allocation, GC, the pointer memory storage and associated cache misses when following the pointers. When printing such a struct using %v however, the Ints are displayed as an array of their uint64 values.
Can we change the String() method to a value receiver instead? For values of type *T, the methods of T are within its method set, so this would work for both *uint256.Int and uint256.Int.
The text was updated successfully, but these errors were encountered:
I often embed uint256.Int types directly into a struct to avoid the overhead of memory allocation, GC, the pointer memory storage and associated cache misses when following the pointers. When printing such a struct using %v however, the Ints are displayed as an array of their uint64 values.
Can we change the String() method to a value receiver instead? For values of type *T, the methods of T are within its method set, so this would work for both *uint256.Int and uint256.Int.
The text was updated successfully, but these errors were encountered: