Skip to content

refactor: update image struct to reduce complexity of lib.rs #69

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

Merged
merged 1 commit into from
Sep 15, 2022

Conversation

tylerslaton
Copy link
Collaborator

@tylerslaton tylerslaton commented Sep 11, 2022

This PR refactors how the image struct works. This takes a large portion of the complexity burden from the lib.rs file and allows us to have the image struct have more functionality. In addition to this, the majority of this functionality has been logically compartmentalized into functions.

@tylerslaton tylerslaton requested a review from exdx September 11, 2022 21:16
Copy link
Owner

@exdx exdx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I think you have another PR that will follow-up this one and make the code even cleaner? I'd like to get rid of the branching if docker else podman logic altogether.

My only remark is that you should run cargo clippy locally to catch lint errors. It also helps rewrite code to make it more concise. I've updated the CI to correctly catch clippy formatting issues. Once you rebase and fix the clippy issues, feel free to merge.

@tylerslaton
Copy link
Collaborator Author

Yes, I have another branch that removes the if paths entirely in favor of using an Image trait with two implementations: Docker and Podman. I'll get on clearing those local errors out.

@tylerslaton tylerslaton force-pushed the refactor-image-struct branch 2 times, most recently from da07f4f to 555016c Compare September 15, 2022 14:00
@tylerslaton tylerslaton merged commit ea861b0 into exdx:main Sep 15, 2022
@tylerslaton tylerslaton deleted the refactor-image-struct branch September 15, 2022 14:14
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 this pull request may close these issues.

2 participants