Address clippy lints, hide some fsevents functions#312
Merged
0xpr03 merged 7 commits intonotify-rs:mainfrom May 13, 2021
Merged
Address clippy lints, hide some fsevents functions#3120xpr03 merged 7 commits intonotify-rs:mainfrom
0xpr03 merged 7 commits intonotify-rs:mainfrom
Conversation
Member
|
I'm not sure why the macos-latest run fails only for this PR with a timeout after 46minutes. I retried the CI and it failed again. |
This avoids accidentally including non-hermetic data in tests.
While I couldn't prove any concrete issues before this patch, it can be risky to have both the event stream thread and the main thread access the context at the same time, since it could lead to data races or undefined behavior. This changes the handling of the context to factor out the `done` channel from the context, and to move explicitly dropping the context once the stream has been stopped. Furthermore, this creates some helper wrappers to send CFRef types across threads instead of casting values to integers.
Contributor
Author
|
I had a bad cast in the callback, which I've fixed. I've added two more fix:
|
Member
|
Thanks for all the work, this looks pretty well. I think we are really in need of somebody that has a mac. Do you want this merged now or are you planning to add more ? Also please also add a changelog entry like previously for the "unreleased" section with a link to your PR. Or just leave a note and I'll do that. |
Member
|
Also I'll have to check, the public stuff could be from the deleted tests we've had previously. |
Contributor
Author
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.
This addresses all the items found by
clippy 0.1.54 (ca82264e 2021-05-09). In addition, it hides the functionsfsevents::Callbackandfsevents::CFRunLoopIsWaiting, which I don't think were intended to be made public.