A bug was reported causing a crash because a pointer was never set. This contribution fixes that by setting the pointer if it's nil. I also added a very basic test that will throw a panic if the unmarshal operation fails on an empty data set. Before the fix the test failed, now it succeeds.
I also went through and cleaned up all the methods so they use pointers correctly. This should reduce the memory footprint by a few bytes by not copying data between Points and PointsAt.
A bug was reported causing a crash because a pointer was never set. This contribution fixes that by setting the pointer if it's nil. I also added a very basic test that will throw a panic if the unmarshal operation fails on an empty data set. Before the fix the test failed, now it succeeds.
I also went through and cleaned up all the methods so they use pointers correctly. This should reduce the memory footprint by a few bytes by not copying data between
Points
andPointsAt
.