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
The Error struct is six words wide. In comparison, most of the types returned via Result are one or two words wide. This means that there is about four words of space wasted in every Result. This could be fixed by making the Error type smaller, perhaps by Boxing its innards.
The text was updated successfully, but these errors were encountered:
Not necessarily, because String is niched so for example Result<String, ()> is the same size as String. This works as long as E is one word or less, so Box fits perfectly (assuming thin pointer of course).
The
Error
struct is six words wide. In comparison, most of the types returned viaResult
are one or two words wide. This means that there is about four words of space wasted in everyResult
. This could be fixed by making theError
type smaller, perhaps byBox
ing its innards.The text was updated successfully, but these errors were encountered: