-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Refactoring of some functionality in links.rs #998
Merged
Merged
Conversation
This file contains 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
Looks like the build failed because nightly can't build rand_core.... i'll try that one again tomorrow 🤷♀ |
Yea, there is an issue with sccache, I just merged a temporary fix. |
This eliminates some duplication and will enable different kinds of LinkTypes to have line number ranges. Implement `From` for the std `Range` types to enable easier construction. The new code reaaalllly makes me wish for a delegation mechanism though :(
I'm not sure in what cases this iterator might possibly return Some again, but let's make absolutely sure.
8ff72c5
to
8c4b292
Compare
Thank you, it passes now after a rebase! |
Thanks, the |
Ruin0x11
pushed a commit
to Ruin0x11/mdBook
that referenced
this pull request
Aug 30, 2020
Refactoring of some functionality in links.rs
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, I have a new feature I'm working on that I could really use for the book (#618), but these refactorings make it easier. I decided to submit these first separately from the new feature, to get feedback before basing the new feature on this.
There are 2 big chunks of refactorings in this PR, and I'm happy to split them into 2 PRs if anyone wants:
parse_include_path
function: I think I've gotten test coverage around all the branches, and I think I've improved the code while keeping those tests passing. I think the code is clearer now, but it's certainly debatable, so I'd love to hear any thoughts.Thanks! ❤️