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
@copyninja mentioned (in warner@46d31b8#commitcomment-29139497) that to_string should be part of the standard Display trait, but I used it as a standalone method on the Mood struct. I'm up for making this Display, but the specific strings used there are part of the wire protocol, so they're fixed and should not be changed in the future (e.g. as part of i18n language-specific translations). So we need some comments to that effect, and some unit tests that ensure the strings remain fixed.
The text was updated successfully, but these errors were encountered:
I implemented Display for the newtypes from #32, and ran into just this sort of problem:
Mailboxes were stringified as Mailbox(abc123) instead of just abc123, which made its way into the OPEN and CLOSE messages we sent to the server, which confused things
the Moods are named Happy and Scared and Error, but in the CLOSE message they're spelled happy and scary and errory, which would break the server statistics
I added unit tests on the message serialization code to make sure these are getting stringified properly.
@copyninja mentioned (in warner@46d31b8#commitcomment-29139497) that
to_string
should be part of the standardDisplay
trait, but I used it as a standalone method on theMood
struct. I'm up for making thisDisplay
, but the specific strings used there are part of the wire protocol, so they're fixed and should not be changed in the future (e.g. as part of i18n language-specific translations). So we need some comments to that effect, and some unit tests that ensure the strings remain fixed.The text was updated successfully, but these errors were encountered: