Open jwasinger opened 5 months ago
In this case, it doesn't increase the avenues for debugging. A panic will point directly to the place where the error is caused. Returning it does the same.
Seems weird to percolate an internal logic error (that a user of this lib has no reasonable way to recover from) through a public interface.
Oh, I just remove the error check and don't panic at all. Happy to add that if it would make debugging easier.
Afaict, it should be safe to assume that a tree being serialized is not malformed. Otherwise, it is catastrophic (programming error) and we might as well let it panic.