charslaw / Pando

Pando serializes and tracks the history of a state tree
MIT License
2 stars 0 forks source link

PANDO-29: replace `SpannableList.VisitSpan` with `SpannableList.CopyTo` #11

Closed schultzcole closed 2 years ago

schultzcole commented 2 years ago

Changing to CopyTo aligns more with the idiomatic way of using spans. It also obviates the need for ISpanVisitor weirdness that made the logic flow for deserializing data from the data source confusing.

IDataSource now has a method CopyNodeBytesTo that takes in a hash and a buffer to populate. This solidifies the IDataSource as being concerned only with storing raw data, and separates the concern of dealing with "real" types to the serializer, which gets the raw bytes then deserializes them to a "real" type.

PANDO-29