Skip to content
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

Clever Challenge - Rust #10

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open

Clever Challenge - Rust #10

wants to merge 18 commits into from

Conversation

Tormyst
Copy link

@Tormyst Tormyst commented Dec 6, 2018

Hope that you like this. If I had more time, I would have added more unit tests.

Also implemented += on result as part of this change.
This method has none of the diff checking properties, it was just
ensuring that we read the directory for all diffs that need to be
checked.  They are temporaraly stored in the set of found files.
RustFmt got lazy and forgot these changes earlier.
Implemented an increment for regions in Result.
With that, region calculation is done
This checks what line came before the decide what to do next.
Work in progress as there are states that are as of yet unfiled.
Work in progress as documentation is not added yet to the new struct
Deleted files and empty file were supported here.
src/diff.rs can now be found in two parts:
src/diff/mod.rs holds the front facing part of the module.
src/diff/diff_type.rs holds the type parcing and state machine logic
Adding regex and lazy static to facilitate easy use of the parcing
system for each line.

The regex used could be replaced without effecting much of the outer
system.

Seeing as anywhere else, filenames are repeated, using the header seems
like a good enough solution for the task that can be quickly exteneded.
The way this is done is throug regex of a single line to find
A bunch of word characters followed by an open bracket.
Printing takes time.  Printing a lot takes longer.  This is a split of
the print time from the compute time.
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.

1 participant