hydration icon indicating copy to clipboard operation
hydration copied to clipboard

Get rid of from_bytes/from_stream code duplication

Open shustinm opened this issue 3 years ago • 0 comments

Is your feature request related to a problem? Please describe. from_bytes and from_stream have nearly identical code and functionality but are still duplicated

Describe the solution you'd like Create a private deserialization method that uses an exhaustive generator to read the data to put into the objects. Then call it from both from_bytes and from_stream.

Additional context This is probably a good time to rename all the hooks to pre_deserialization_hook, post_deserialization_hook, etc...

shustinm avatar May 02 '21 22:05 shustinm