Skip to content

Refactor to avoid code duplication #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
thalesfragoso opened this issue Nov 6, 2019 · 1 comment · Fixed by #14
Closed

Refactor to avoid code duplication #10

thalesfragoso opened this issue Nov 6, 2019 · 1 comment · Fixed by #14

Comments

@thalesfragoso
Copy link
Contributor

thalesfragoso commented Nov 6, 2019

Right now there is a lot of code duplication between Fat32Volume and Fat16Volume types. Since the filesystem type is only known at runtime, everything gets compiled in. It might be better to refactor both into a single type and do the matching internally instead of outside, the downside is that not everything translates between the two, it would need more fields with Option in the struct and probably some more methods would have to be made failable.

@thejpster
Copy link
Member

Good point, I agree.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants