Closed xoen closed 1 month ago
I know it's kinda cosmetic but maybe it's worth deciding on what to do in regards of the American vs. British spelling before introducing more inconsistencies :)
For example here I've named one of the tests deserialize_power_data_test()
with a z
😬
FYI: I've tweaked the spelling.
thanks @xoen
Added some tests for the internal utility functions used to handle dates:
to_tuples()
normalise_dates()
These would have prevented this glitch earlier :)
I've also made some small refactoring after introducing these tests:
to_tuples()
just takes theVec<Data>
instead of the wholeRegionData
struct (as it's only using the data anyway)RegionData
even tho the logic only involves the datato_tuples()
uses Rust's Iterators and avoidsmut
/Vec::push()
This should resolve Issue #14