-
Notifications
You must be signed in to change notification settings - Fork 124
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
Use a wrapper type implementing Sync
, instead of static mut
#700
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #700 +/- ##
==========================================
+ Coverage 75.34% 76.16% +0.82%
==========================================
Files 48 45 -3
Lines 8257 8153 -104
==========================================
- Hits 6221 6210 -11
+ Misses 2036 1943 -93
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Re-ran CI so it would use the new nightly, and everything passes. |
Could you just add a changelog entry for the scanner for this? AFAICT this is not a breaking change, but it's still noteworthy imo. |
`static mut` is generally best avoided. It seems to only be necessary currently to allow the use of non-`Sync` types, since pointers are not sync. This also removes the `NULLPTR` constant in favor of using `std::ptr::null`, uses `.as_ptr()` instead of casting, and uses the arrray repeating syntax to define `types_null`. None of those should impact behavior or the public API. `*_requests` and `*_events` static are no longer public now. This is theoretically a breaking change, but shouldn't really impact anything.
003ac2c
to
ee7e346
Compare
Mentioned in changelog, and fixed more CI warnings. |
…hay#700) * Use a wrapper type implementing `Sync`, instead of `static mut` `static mut` is generally best avoided. It seems to only be necessary currently to allow the use of non-`Sync` types, since pointers are not sync. This also removes the `NULLPTR` constant in favor of using `std::ptr::null`, uses `.as_ptr()` instead of casting, and uses the arrray repeating syntax to define `types_null`. None of those should impact behavior or the public API. `*_requests` and `*_events` static are no longer public now. This is theoretically a breaking change, but shouldn't really impact anything. * Suppress `clippy::test_attr_in_doctest` lint * Address nightly warnings
static mut
is generally best avoided. It seems to only be necessary currently to allow the use of non-Sync
types, since pointers are not sync.This also removes the
NULLPTR
constant in favor of usingstd::ptr::null
, uses.as_ptr()
instead of casting, and uses the arrray repeating syntax to definetypes_null
. None of those should impact behavior or the public API.*_requests
and*_events
static are no longer public now. This is theoretically a breaking change, but shouldn't really impact anything.