Closed Turbo87 closed 5 years ago
I'm not sure I agree with splitting out the range part of the Extension
struct. If there was a case for an ExtensionRange
to exist without a parent Extension
(or an Extension
to exist without an ExtensionRange
for that matter) I might feel a little differently. At the moment they're so tightly coupled it doesn't make sense for them to be independent structures. Plus Extension
only has three fields, it's not exactly unmanageably large ;)
Plus
Extension
only has three fields, it's not exactly unmanageably large
it's not size that's the problem, it's more the unnecessary lifetime management that seems a little annoying to me 🤔
@Joey9801 any thoughts on the other commits in this PR?
Constructors are good, moving I/J records into their own modules is good. I've just merged both of those things - try to avoid conflating too many different things in a single PR.
This PR extracts an
ExtensionRange
struct from the existingExtension
struct to simplify theget_extension()
method signature. It also extracts a constructor for theExtension
struct and moves theIRecord
andJRecord
structs to dedicated files to make them a little more discoverable.