-
Notifications
You must be signed in to change notification settings - Fork 18
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
Fix panic when turning off use_cache
#22
base: master
Are you sure you want to change the base?
Conversation
Hi, could you please push an empty commit to trigger the CI ? |
The main problem with the old code was that all of the cache RefCells were held for too long because of the huge scope of the `fuzzy` function. The problem was already solved by just wrapping some of the code with an extra scope `{` + `}`. However I chose to refactor a bit and split the old function into 3 new ones: - `simple_match` - was already there - `sophisticated_match` - basically the else case of `simple_match` - `fuzzy_inner` - a function just for the control flow of the other function. This also handles the cache invalidation This should supersede the pull request skim-rs#20
21d8d30
to
a399f39
Compare
This reverts commit 681507e.
@LoricAndre Doesn't really seem to work |
@RobWalt could you please fix the tests before we can review this ? |
@LoricAndre Sure, should I open a separate PR for this as this has nothing to do with my changes? (The CI also fails on main for the same reason) I think it's mainly because of the old version of |
Then wait for a bit, we have some work on skim itself then we'll work on updating this repo and making sure everything looks alright, then you can rebase and we'll merge this |
No worries! Thanks for taking the time to review the pull request! |
The main problem with the old code was that all of the cache RefCells
were held for too long because of the huge scope of the
fuzzy
function. The problem was already solved by just wrapping some of the
code with an extra scope
{
+}
. However I chose to refactor a bitand split the old function into 3 new ones:
simple_match
- was already theresophisticated_match
- basically the else case ofsimple_match
fuzzy_inner
- a function just for the control flow of the otherfunction. This also handles the cache invalidation
This should supersede the pull request #20