As of commit de8d58c72f8c0e915f162589cf56f512e034ced7, message deserialization does zero error checking, and the server will safely crash if a malformed message come across the wire. Although this is not a huge issue in a just-for-fun game intended to be played between friends, it is worth cleaning up the code around message deserialization. Change instances of T::init_from_bubby into T::parse_from_bubby which will return std::result[[T, std::error]] instead of T.
As of commit de8d58c72f8c0e915f162589cf56f512e034ced7, message deserialization does zero error checking, and the server will safely crash if a malformed message come across the wire. Although this is not a huge issue in a just-for-fun game intended to be played between friends, it is worth cleaning up the code around message deserialization. Change instances of
T::init_from_bubby
intoT::parse_from_bubby
which will returnstd::result[[T, std::error]]
instead ofT
.