Open
Conversation
Owner
|
@art-of-dom I'm curious what do you think? |
Collaborator
|
I think in general splitting the code up is a good idea in the long run to make it unit testable. I however am not an expert at rust so I will not be as effective as a reviewer as I'd like to be. Glancing at it now, there are a few things that should be changed a bit. |
art-of-dom
reviewed
Mar 9, 2019
src/main.rs
Outdated
| enum ErrorCode { | ||
| Any, | ||
| Code(u32), | ||
| process::exit(exit_status); |
Collaborator
There was a problem hiding this comment.
the process::exit should stick in main so we can unit test other functions that we call into. Having it here will always exit the process.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi,
at the beginning I did not plan to move so much code around, but here we are 😃
Before I go any further it might be a good idea to get some feedback from you and have a conversation to see where things go.
If you don't like my changes, feel happy to take only what you like or nothing at all (I'm not emotional attached to it – coding was just-for-fun). This code should behave exactly like the current master code.
Since the code has no tests, all I did was a quick manual test, through the split-up code structure should it make easier to write tests in future.